SA-MP Forums Archive
[HELP] array sizes do not match, or destination array is too small - 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: [HELP] array sizes do not match, or destination array is too small (/showthread.php?tid=115817)



[HELP] array sizes do not match, or destination array is too small - skaTim - 26.12.2009

Код:
D:\San Francisco City RPG v3\gamemodes\skaTim.pwn(12692) : error 047: array sizes do not match, or destination array is too small
D:\San Francisco City RPG v3\gamemodes\skaTim.pwn(15648) : error 047: array sizes do not match, or destination array is too small
D:\San Francisco City RPG v3\gamemodes\skaTim.pwn(15815) : error 047: array sizes do not match, or destination array is too small
D:\San Francisco City RPG v3\gamemodes\skaTim.pwn(16175) : error 047: array sizes do not match, or destination array is too small
D:\San Francisco City RPG v3\gamemodes\skaTim.pwn(16974) : error 047: array sizes do not match, or destination array is too small
D:\San Francisco City RPG v3\gamemodes\skaTim.pwn(17507) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
A'right, i don't know what to do, any help please?
__________________________________________
Код:
LINE 12692: x_info = strtok(cmdtext, idx);
LINE 15648: x_info = strtok(cmdtext, idx);
LINE 15815: x_info = strtok(cmdtext, idx);
LINE 16175: x_info = strtok(cmdtext, idx);
LINE 16974: x_info = strtok(cmdtext, idx);
LINE 17507: tmp = strtok(params, idx);
same lines...what should i do?


Re: [HELP] array sizes do not match, or destination array is too small - KnooL - 26.12.2009

I suggest you should use dcmd instead of strtok. And I think that some of your 'new' variables e.g.
new string[128]; is too small or too big.


Re: [HELP] array sizes do not match, or destination array is too small - DeathOnaStick - 26.12.2009

Quote:
Originally Posted by KnooL
I suggest you should use dcmd instead of strtok. And I think that some of your 'new' variables e.g.
new string[128]; is too small or too big.
+1. sscanf in combination with dcmd is much better, really.


Re: [HELP] array sizes do not match, or destination array is too small - Niixie - 26.12.2009

Thats what i use and its MUCH better, and easier


Re: [HELP] array sizes do not match, or destination array is too small - skaTim - 26.12.2009

A'right, thanks for the reply, it work's now.