Results 1 to 9 of 9

Thread: Localized string not precached.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by EvoloZz View Post
    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.
    Last edited by Tally; 25th March 2013 at 19:12.

  2. The Following User Says Thank You to Tally For This Useful Post:

    kung foo man (26th March 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •