What is wrong with that code?
#2

1. new tmp[ 128 ];
2.
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;
}
3. new sendername[ MAX_PLAYER_NAME ];
Reply


Messages In This Thread
What is wrong with that code? - by vent - 12.10.2011, 11:50
Re: What is wrong with that code? - by Jafet_Macario - 12.10.2011, 11:55
Re: What is wrong with that code? - by vent - 12.10.2011, 11:58
Re: What is wrong with that code? - by Jafet_Macario - 12.10.2011, 12:00
Re: What is wrong with that code? - by vent - 12.10.2011, 12:03

Forum Jump:


Users browsing this thread: 1 Guest(s)