Errors! :(
#2

Brr, strtok. This GM is 3 years old btw.

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;
}
Reply


Messages In This Thread
Errors! :( - by yooMx - 18.03.2013, 17:32
Re: Errors! :( - by Misiur - 18.03.2013, 19:31

Forum Jump:


Users browsing this thread: 1 Guest(s)