Need help: error 018: initialization data exceeds declared size - 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)
+--- Thread: Need help: error 018: initialization data exceeds declared size (
/showthread.php?tid=418779)
So new problem on stats it shows only random letters.. -
Scrillex - 26.02.2013
So maybe knows whats wrong...
PHP код:
new fightingstyles[][] = {
{"Normal"},//This line
{"Boxing"},
{"KungFu"},
{"Knee Head"},
{"HeadGrab"},
{"KickElbow"}
};
And I added this:
PHP код:
new Fightings = fightingstyles[playerid][pInfo[playerid][Fighting]-1];
On stats command
So I added this and now I have problem Fighting: m
Not Boxing or something
If I chose normal it shows letter a. For example Fighting: a
Re: Need help: error 018: initialization data exceeds declared size -
Jefff - 26.02.2013
pawn Код:
format(str,sizeof(str),"%s",fightingstyles[pInfo[playerid][Fighting]-1]);
or
pawn Код:
new str[10];
strcat(str,fightingstyles[pInfo[playerid][Fighting]-1]);