12.02.2011, 02:20
Hello guys,
I have got an admin system from a tutorial, but there are 2 errors when i compile:
C:\DOCUME~1\casa\DOCUME~1\DOWNLO~1\SERVER~1\MADEIN ~1\FILTER~1\AdminS.pwn(229) : error 021: symbol already defined: "strtok"
C:\DOCUME~1\casa\DOCUME~1\DOWNLO~1\SERVER~1\MADEIN ~1\FILTER~1\AdminS.pwn(243) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Now i will put the error zone here:
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;
}
Pratically it says that strtok is already defined lol.
idk how make, someone help me pls!
I have got an admin system from a tutorial, but there are 2 errors when i compile:
C:\DOCUME~1\casa\DOCUME~1\DOWNLO~1\SERVER~1\MADEIN ~1\FILTER~1\AdminS.pwn(229) : error 021: symbol already defined: "strtok"
C:\DOCUME~1\casa\DOCUME~1\DOWNLO~1\SERVER~1\MADEIN ~1\FILTER~1\AdminS.pwn(243) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Now i will put the error zone here:
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;
}
Pratically it says that strtok is already defined lol.
idk how make, someone help me pls!