error 047: 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: error 047: array sizes do not match, or destination array is too small (
/showthread.php?tid=162947)
error 047: array sizes do not match, or destination array is too small -
matrixismyname - 25.07.2010
it gives me error 047: array sizes do not match, or destination array is too small at lines:
Код:
cmd = strtok(cmdtext, idx);
tmp = strtok(cmdtext, idx);
and every line that looks like that, the error just appeared after i updated my pawno from r1 to r8. Please help.
Re: error 047: array sizes do not match, or destination array is too small - WackoX - 25.07.2010
have you made cmd and tmp an array?
And BTW don't use strtok, it's an old methode from -2006 and it's slow and dificult.
Re: error 047: array sizes do not match, or destination array is too small -
matrixismyname - 25.07.2010
Quote:
Originally Posted by WackoX
have you made cmd and tmp an array?
And BTW don't use strtok, it's an old methode from -2006 and it's slow and dificult.
|
and how to do it then? I didn't script for awhile so i'm a little behind.
Re: error 047: array sizes do not match, or destination array is too small -
Jeffry - 25.07.2010
Add this to your command.
Re: error 047: array sizes do not match, or destination array is too small -
dice7 - 25.07.2010
C++ is from 1983 and is still one of the fastest high level languages today. And processing code is super fast, If you panic about a milisecond or two, then you need to see someone.
matrixismyname, change the array size to 256 cells
Re: error 047: array sizes do not match, or destination array is too small -
matrixismyname - 25.07.2010
Quote:
Originally Posted by Jeffry
Add this to your command.
|
That did the magic, thank you!
Re: error 047: array sizes do not match, or destination array is too small -
Jeffry - 25.07.2010
No problem.
You always have to put "256" at your variable when you call the strtok function.