How to check if the string length is properly written - 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)
+--- Thread: How to check if the string length is properly written (
/showthread.php?tid=434275)
How to check if the string length is properly written -
GwENiko - 01.05.2013
Hi, i wanted to know how am i supposed to check whether the player has typed a command properly, example: /up, /down. Using zcmd and sccanf for this.
Re: How to check if the string length is properly written -
Riddick94 - 01.05.2013
What do you mean "properly typed command" ? Player can type "/uppp" or "/u p" and it will not work. You want to display player message, when he typed the wrong command or something like that? I can't clearly understand, what you're trying to achieve.
Re: How to check if the string length is properly written -
GwENiko - 01.05.2013
I already found out, sorry for the trouble lol.
pawn Код:
if(strcmp(text, "up", true) == 0)
This is what i wanted to do.
Re: How to check if the string length is properly written -
Riddick94 - 01.05.2013
Quote:
Originally Posted by GwENiko
Using zcmd and sccanf for this.
|
Quote:
Originally Posted by GwENiko
pawn Код:
if(strcmp(text, "up", true) == 0)
This is what i wanted to do.
|
It doesn't look like sscanf and zcmd, but anyway.. I'm glad you've got what you wanted...