SA-MP Forums Archive
Error help in script. 3 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: Error help in script. 3 errors (/showthread.php?tid=134264)



Error help in script. 3 errors - Josh_Kerns - 15.03.2010

C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\SWRP.pwn(17785) : error 025: function heading differs from prototype
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\SWRP.pwn(17786) : error 021: symbol already defined: "strtok"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\SWRP.pwn(17796) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Code:
{
new ret[256], i = 0, len = strlen(string);
while(string[idx] == seperator && idx < len) idx++;
while(string[idx] != seperator && idx < len)
{
ret[i] = string[idx];
i++;
idx++;
}
while(string[idx] == seperator && idx < len) idx++;
return ret;
}



Re: Error help in script. 3 errors - Josh_Kerns - 16.03.2010

Can someone help me. I`m getting sick of these errors and i still can`t figure this out.


Re: Error help in script. 3 errors - cessil - 16.03.2010

025 means you said the function is going to have x amount of variables and it has y.

021 means you've defined strtok more than once

047 means you're cramming something big into a smaller variable most likely.

we can't actually help you further than this unless you pasted the lines in your code that have errors


Re: Error help in script. 3 errors - Josh_Kerns - 16.03.2010

So what program or something do i use to upload the lines so you can see them?


Re: Error help in script. 3 errors - cessil - 16.03.2010

well its only a few lines you can use the [ code ] thing on the forums


Re: Error help in script. 3 errors - Josh_Kerns - 16.03.2010

I just found out the problem. I had to delete the extra strtok lines and that cleared the rest of the problems. FINALLY!!