Strtok problem.
#1

I'm currently editing the lvdm.pwn from SAMP and I'm getting a 'strtok' error. To begin with, I honestly haven't touched the strtok code, and this is the error I get.

Код:
C:\Users\User\Desktop\SAMP Scripting\pawno\lvdm.pwn(929) : error 021: symbol already defined: "strtok"
C:\Users\User\Desktop\SAMP Scripting\pawno\lvdm.pwn(944) : 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.
... and ...

This is the line where the error is occurring.

pawn Код:
strtok(const string[], &index)
{ // line 929
    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; // line 944
}
-..

Any concerns why this is actually occurring?
Reply


Messages In This Thread
Strtok problem. - by AcId n RaPiD - 13.02.2011, 17:37
Re: Strtok problem. - by Calgon - 13.02.2011, 17:39
Re: Strtok problem. - by AcId n RaPiD - 13.02.2011, 17:43
Re: Strtok problem. - by Calgon - 13.02.2011, 17:43
Re: Strtok problem. - by Mean - 13.02.2011, 19:40
Re: Strtok problem. - by Calgon - 13.02.2011, 19:43

Forum Jump:


Users browsing this thread: 1 Guest(s)