Textdraw word shortage
#1

Hello, i have been working on a rank system, and it works greate tho, when the textdraw should show the rank is shorten the word.

e.g Private is "P"

pawn Код:
forward Textdraw(playerid);
public Textdraw(playerid)
{
  new str[128],Rank = pi[playerid][Level],Newrank = (pi[playerid][Level] + 1);
  format(str,sizeof(str),"Rank: %s~n~Level: %d~n~Exp: %d~n~Exp Needed: %d",ri[Rank][Rname],Rank,pi[playerid][Exp],ri[Newrank][Req]);
  TextDrawSetString(Stats[playerid],str);
}
I use this line to create the rank:
Код:
NewRank(0, "Private", 0);
and "Private" is the Rank name(Rname)

i use this stock to make the rank:
Код:
stock NewRank(rankID, const Name[], Requirement)
{
  TotalRanks++;
	format(ri[rankID][Rname],64,"%s", Name);
	ri[rankID][Req] = Requirement;
}
And i just can't seem to find the problem.
Reply
#2

new str[450];

that's what mines at.
Reply
#3

Quote:
Originally Posted by Anthony_Brassi
new str[450];

that's what mines at.
It's not the length of the string. Thanks tho.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)