19.11.2013, 07:26
(
Последний раз редактировалось Biesmen; 19.11.2013 в 08:18.
)
pawn Код:
new playername[24];
if( strfind( playername, "TAG", true) == -1 )
{
SendClientMessage( playerid, 0xFFFFFFFF, "...................");
return 1;
}
- Why are you using "== -1"? It returns -1 if the text "TAG" has not been found. It returns a different value if it is found. Which means, you should definitely replace "== -1" with "!= -1". Unless you want to close the callback for users who do not have "TAG" in their name. If this is the case, then ignore this point.
Of course, it returns "-1" which means, "TAG" has not been found in the array with no content.
At this moment strfind is looking for the text "TAG" in the array playername. But playername does not have content, which means the array is defined like this: "".