SA-MP Forums Archive
[HELP]With some errors. - 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]With some errors. (/showthread.php?tid=260840)



[HELP]With some errors. - GBLTeam - 10.06.2011

pawn Код:
C:\Users\GBLTeam\Desktop\STDM\Gamemodes\SATDM_v9.pwn(4540) : warning 201: redefinition of constant/macro (symbol "OnPlayerEnterRaceCheckpoint")
C:\Users\GBLTeam\Desktop\STDM\Gamemodes\SATDM_v9.pwn(29822) : error 047: array sizes do not match, or destination array is too small
C:\Users\GBLTeam\Desktop\STDM\Gamemodes\SATDM_v9.pwn(29832) : error 047: array sizes do not match, or destination array is too small
C:\Users\GBLTeam\Desktop\STDM\Gamemodes\SATDM_v9.pwn(29951) : error 047: array sizes do not match, or destination array is too small
C:\Users\GBLTeam\Desktop\STDM\Gamemodes\SATDM_v9.pwn(29971) : error 047: array sizes do not match, or destination array is too small
C:\Users\GBLTeam\Desktop\STDM\Gamemodes\SATDM_v9.pwn(29978) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Line: 29822
pawn Код:
TBuilder=strtok(templine,idx); // read off RACEBUILDER
Line: 29832
pawn Код:
TempLapper=strtok(templine,idx);
Line: 29951
pawn Код:
CBuilder=strtok(templine,i); // read off RACEBUILDER
Line: 29971
pawn Код:
TopRacers[j]=strtok(templine,i);
Line: 29978
pawn Код:
TopLappers[j]=strtok(templine,i);



Re: [HELP]With some errors. - Tee - 10.06.2011

For this:

pawn Код:
OnPlayerEnterRaceCheckpoint
You defined it more than once, so you have OnPlayerEnterRaceCheckpoint either 2 or more times in the script.

For the rest (I am not good at strtok) but they need to have an array example: new TBuilder[32];


Re: [HELP]With some errors. - GBLTeam - 10.06.2011

Quote:
Originally Posted by Tee
Посмотреть сообщение
For this:

pawn Код:
OnPlayerEnterRaceCheckpoint
You defined it more than once, so you have OnPlayerEnterRaceCheckpoint either 2 or more times in the script.

For the rest (I am not good at strtok) but they need to have an array example: new TBuilder[32];
pawn Код:
This            new File:f, templine[256], TBuilder[MAX_PLAYER_NAME], TempLapper[MAX_PLAYER_NAME], TempLap; ?
or

pawn Код:
new temprace[67], idx;



Re: [HELP]With some errors. - Tee - 10.06.2011

Your code seems ok, for some reason I get that error when I am storing a string into a variable and my array size is less than 260; change your array sizes to 260 and try again.