19.10.2009, 10:42
Quote:
Originally Posted by Y_Leѕѕ
Firsly - strtok has ALWAYS had a limit, and if you don't like it then it's in an open source library, so just change it.
Secondly - use sscanf! |
-------------------------------------
stock strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[128];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
--------------------------------------
And I'd never changed. But this is other....
I think that all joung nub scripter can't change the libraries. And than:
For me, to have a default lower limit to the maximum limit of characters of a PlayerName is ridiculous.