Pawno error 021: -_- - 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: Pawno error 021: -_- (
/showthread.php?tid=516915)
Pawno error 021: -_- -
ashwinsekhari - 02.06.2014
hello guys im back to scripting but i have lost my mind please tell me what to do i have this error
Код:
C:\Users\Ashwin\Desktop\Land of Paradise\gamemodes\larp.pwn(25115) : error 021: symbol already defined: "strtok"
and my lines are
Код:
25114 :strtok(const string[], &index)
25115 :{
25116 : new length = strlen(string);
25117 : while ((index < length) && (string[index] <= ' '))
25118 : {
25119 : index++;
25120 : }
25121 :
25122 : new offset = index;
25123 : new result[20];
25124 : while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
25125 : {
25126 : result[index - offset] = string[index];
25127 : index++;
25128 : }
25129 : result[index - offset] = EOS;
25130 : return result;
25131 :}
Re: Pawno error 021: -_- -
Spartaaaaa - 02.06.2014
Код:
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;
}
+REP if i helped u
Re: Pawno error 021: -_- -
Lynn - 02.06.2014
Remove the entire function and Compile.
It's already defined in A) Anther location of your script or B) Inside a Include file.
Re: Pawno error 021: -_- -
Rittik - 02.06.2014
Either remove the stock funtion or the "..gl_common" include.
Re: Pawno error 021: -_- -
ashwinsekhari - 02.06.2014
thx everyone +Rep to all