SA-MP Forums Archive
Strtok or so - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Strtok or so (/showthread.php?tid=149864)



Strtok or so - Headshot1108 - 23.05.2010

Well I like to make that admins in my server don't can make /ban [id] dddddddddddddddddddddd so that the max. letter WITHOUT any space not more than 10 is.
Because I have a Banlist in my website and the big letters without any space kills my table. a big letter with spaces it tabulates.


Re: Strtok or so - Headshot1108 - 23.05.2010

bump


Re: Strtok or so - Backwardsman97 - 23.05.2010

You would need to put this in your code and adjust it accordingly

pawn Код:
if(strlen(string) > 10 || strfind(string," ") != -1)
{
  //invalid
  return 1;
}



Re: Strtok or so - Headshot1108 - 24.05.2010

So is working at me:

pawn Код:
if(strlen(result) > 10 && strfind(result," ") == -1)
{
  //Invalid
  return 1;
}