Originally Posted by
EvoloZz
Yeah but if I precache it, the hud will show this ingame: RANK_RANK, and that's not what I want, I want it to read it from the string file.
the eXtreme+ mod has been doing it that way for years without any problems:
extreme/_ex_varcache.gsc
Code:
[[level.ex_PrecacheString]](&"RANK_RANK");
extreme/_ex_ranksystem.gsc:
Code:
if(level.ex_rankhud == 2)
{
rankstring = self getRankstring(self.pers["rank"]);
if(!isDefined(self.ex_rankhud1))
{
self.ex_rankhud1 = newClientHudElem(self);
self.ex_rankhud1.horzAlign = "fullscreen";
self.ex_rankhud1.vertAlign = "fullscreen";
self.ex_rankhud1.alignX = "left";
self.ex_rankhud1.alignY = "middle";
self.ex_rankhud1.x = 10;
self.ex_rankhud1.y = 474;
self.ex_rankhud1.alpha = 1;
self.ex_rankhud1.fontScale = 0.8;
self.ex_rankhud1.label = &"RANK_RANK";
}
if(isDefined(self.ex_rankhud1)) self.ex_rankhud1 setText(rankstring);
}
localizedstrings/rank.str:
Code:
REFERENCE RANK
LANG_ENGLISH "RANK: "
It works fine.
BTW- I wrote the ranksystem for the eXtreme+ mod back in 2006. I have never had any problems precaching a label and getting it to show correctly. As long as you do everything right, it should show correctly. The only thing I can see that is different about your label is that there isn't a space after the colon, but I suspect that wouldn't make a difference anyway.