SA-MP Forums Archive
enum problem please help![SOLVED] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: enum problem please help![SOLVED] (/showthread.php?tid=118563)



enum problem please help![SOLVED] - kamilbam - 03.01.2010

Hi for last 2 days i was trying to solve my enum problem:

Код:
enum pRank
{
	gRank[20]
}
new gPlayerRank[MAX_PLAYERS][20];
And this is how i set the gRank

Код:
gPlayerRank[playerid][gRank] = "Private";
I want this to show up as an item in my stats dialog so i did:

Код:
new string0[64];
format(string0,sizeof(string0),"Rank:  			%s", gPlayerInfo[playerid][gRank]);
When i do that i get Tag mismatch warning, and its about this line:

Код:
format(string0,sizeof(string0),"Rank:  			%s", gPlayerInfo[playerid][gRank]);
Finally i did print i get something like this:

Код:
Rank:  			9ţ
I was trying to fix this problem for 2 days now, asked on the irc and nobody knew the solution, thats why im begging you for help, i just dont know what can be wrong ;l




Re: enum problem please help! - [HiC]TheKiller - 03.01.2010

pawn Код:
new gPlayerRank[MAX_PLAYERS][pRank];
Instead of
pawn Код:
new gPlayerRank[MAX_PLAYERS][20];



Re: enum problem please help! - kamilbam - 03.01.2010

Quote:
Originally Posted by [HiC
TheKiller ]
pawn Код:
new gPlayerRank[MAX_PLAYERS][pRank];
Instead of
pawn Код:
new gPlayerRank[MAX_PLAYERS][20];
If i do that i get 11 errors

Код:
error 047: array sizes do not match, or destination array is too small
Edit: Solved