Compile Error - 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: Compile Error (
/showthread.php?tid=250774)
Compile Error -
RaulSTARs - 24.04.2011
Hello , I'm trying to compile my gm when...
Error :
Код:
D:\X\Y\Z\gamemodes\GameMode.pwn(22942) : error 047: array sizes do not match, or destination array is too small
The Line 22942 - 22945
Код:
new x_nr[64];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
Who can Help me please?
Re: Compile Error -
Jeffry - 24.04.2011
pawn Код:
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
strtok returns a 256-er string.
Re: Compile Error -
Vince - 24.04.2011
My advise: Don't use strtok at all and convert it all to zcmd and sscanf.
I do not recommend this, but if you must, you'll need to change the size of
x_nr to 255 or 256.
Edit: too late
Re: Compile Error -
RaulSTARs - 24.04.2011
Vince , It's not too late , thank you for help
Jeffry Thank you for help.
And... WORKS Thanks guys ;x ;x ;x
Re: Compile Error -
Jeffry - 24.04.2011
No problem.
Have fun, and Happy Easter.