I need some help please - 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: I need some help please (
/showthread.php?tid=262457)
I need some help please -
bcretu64 - 18.06.2011
I have these error when i compile:
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12136) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12151) : error 047: array sizes do not match, or destination array is too small
And these are lines 12136 and 12151:
12136: strtok(const string[], &index)
{
12151: return result;
What i need to do to solve this please help me
Re: I need some help please -
arturo clark - 18.06.2011
Код:
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12136) : error 021: symbol already defined: "strtok"
strtok is already defined, you have defined 2 or more times strtok.
Код:
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12151) : error 047: array sizes do not match, or destination array is too small
Here is the definition of strtok:
pawn Код:
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
https://sampwiki.blast.hk/wiki/Strtok
Re: I need some help please -
bcretu64 - 18.06.2011
thanks you so much i will try this now
Re: I need some help please -
bcretu64 - 18.06.2011
again give me these errors
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12136) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12151) : error 047: array sizes do not match, or destination array is too small
EDIT: I have solved the problem! Simple deleted the definition!