SA-MP Forums Archive
array problem - 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: array problem (/showthread.php?tid=295604)



array problem - RBTDM - 06.11.2011

What is the main cause of this error?
pawn Код:
C:\Program Files\PS\zombi\gamemodes\Gamer.pwn(9350) : error 047: array sizes do not match, or destination array is too small
C:\Program Files\PS\zombi\gamemodes\Gamer.pwn(9360) : error 047: array sizes do not match, or destination array is too small
C:\Program Files\PS\zombi\gamemodes\Gamer.pwn(9479) : error 047: array sizes do not match, or destination array is too small
C:\Program Files\PS\zombi\gamemodes\Gamer.pwn(9499) : error 047: array sizes do not match, or destination array is too small
C:\Program Files\PS\zombi\gamemodes\Gamer.pwn(9506) : error 047: array sizes do not match, or destination array is too small
And how to fix it? please help


Re: array problem - RBTDM - 06.11.2011

please help me.........


Re: array problem - Sascha - 06.11.2011

post the code that causes this...


Re: array problem - RBTDM - 06.11.2011

This is from yagu race
pawn Код:
[line = 9350 ] Builder=strtok(templine,idx); // read off RACEBUILDER
[line = 9360 ] TempLapper=strtok(templine,idx);
[line = 9479 ] new File:f, i;
[line = 9499 ] TopRacers[j]=strtok(templine,i);
[line = 9506 ] TopLappers[j]=strtok(templine,i);



Re: array problem - RBTDM - 06.11.2011

help....


Re: array problem - MP2 - 06.11.2011

How large is the templine array? I think it must be 256 to work with strtok.


Re: array problem - RBTDM - 06.11.2011

then how the code will be?


Re: array problem - MP2 - 06.11.2011

new templine[256];

or

new other_variables_and_arrays, templine[256];