Car Colour Changing
#10

Quote:
Originally Posted by =>Sandra<=
Quote:
Originally Posted by lrZ^ aka LarzI
Sandra, you should know that you shouldn't use 256 as string variable size...
Making stringvariable size less then 255, you will get "array sizes do not match, or destination array is too small"-error with strtok
only if you use some kinds of noob modifications of strtok

thats the orginal from pawn-lang.pdf (2006)
pawn Код:
strtok(const string[], &index)
{
    new length = strlen(string)
    /* skip leading white space */
    while (index < length && string[index] <= ' ')
    index++
    /* store the word letter for letter */
    new offset = index /* save start position of token */
    new result[20] /* string to store the word in */
    while (index < length && string[index] > ' ' && index - offset < sizeof result - 1)
    {
        result[index - offset] = string[index]
        index++
    }
    result[index - offset] = EOS /* zero-terminate the string */
    return result
}
Reply


Messages In This Thread
Car Colour Changing - by Abyss - 31.03.2009, 18:40
Re: Car Colour Changing - by Sandra18[NL] - 31.03.2009, 18:44
Re: Car Colour Changing - by Abyss - 31.03.2009, 18:45
Re: Car Colour Changing - by Sandra18[NL] - 31.03.2009, 18:55
Re: Car Colour Changing - by LarzI - 31.03.2009, 19:07
Re: Car Colour Changing - by Danut - 31.03.2009, 19:11
Re: Car Colour Changing - by Abyss - 31.03.2009, 19:11
Re: Car Colour Changing - by LarzI - 31.03.2009, 19:30
Re: Car Colour Changing - by Sandra18[NL] - 31.03.2009, 20:01
Re: Car Colour Changing - by Nero_3D - 31.03.2009, 20:38

Forum Jump:


Users browsing this thread: 1 Guest(s)