24.10.2012, 19:21
Hello.
And again I get stuck at something wierds...
Here is my code:
str = the player name.
Problem,
When the player name is like RoelRoel it works fine.
But if it is, RoelRoelRoelRoel, it just keep looping and won't give me a return...
I can't find the reason, maybe somebody can?
And again I get stuck at something wierds...
Here is my code:
str = the player name.
pawn Код:
new bool:valid,tempchar[2];
for(new n = 0; n < strlen(str); n++)
{
valid = false;
for(new c = 0; c < sizeof(ARY_VALID_MAIN_CHARACTERS); c++)
{
strmid(tempchar, str, n, n+1);
if(strcmp(tempchar,ARY_VALID_MAIN_CHARACTERS[c], true ) == 0)
{
valid = true;
}
}
if(valid == false)
{
return true;
}
}
When the player name is like RoelRoel it works fine.
But if it is, RoelRoelRoelRoel, it just keep looping and won't give me a return...
I can't find the reason, maybe somebody can?