Checking if inputtext is 4 digits.
#2

Quote:
Originally Posted by faff
Посмотреть сообщение
Evening,

I want to check if the pincode an administrator selected is 4 digits long.

I tried to do that this way.

PHP код:
        if(sscanf(params"d"pass)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /changeadminpin [Pin code]");
        if(
strlen(pass) < || strlen(pass) > 4) return SendClientMessage(playeridCOLOR_WHITE"SERVER: The pincode must be 4 digits."); 
But this is not working, if I try to compile it is showing me these errors.
Код:
C:\Users\fabio\Desktop\International Roleplay\gamemodes\I-RP.pwn(2306) : error 035: argument type mismatch (argument 1)
C:\Users\fabio\Desktop\International Roleplay\gamemodes\I-RP.pwn(2328) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
You are not declaring pass as a string. In order to use strlen 'pass" should be a string.
Reply


Messages In This Thread
Checking if inputtext is 4 digits. - by faff - 09.10.2015, 20:54
Re: Checking if inputtext is 4 digits. - by ThePhenix - 09.10.2015, 20:56
Re: Checking if inputtext is 4 digits. - by Crayder - 09.10.2015, 21:00
Re: Checking if inputtext is 4 digits. - by faff - 09.10.2015, 21:01
Re: Checking if inputtext is 4 digits. - by faff - 09.10.2015, 21:06
Re: Checking if inputtext is 4 digits. - by faff - 09.10.2015, 21:15
Re: Checking if inputtext is 4 digits. - by Ahmad45123 - 09.10.2015, 21:19
Re: Checking if inputtext is 4 digits. - by faff - 09.10.2015, 21:40
Re: Checking if inputtext is 4 digits. - by Crayder - 09.10.2015, 21:53
Re: Checking if inputtext is 4 digits. - by Ahmad45123 - 09.10.2015, 22:08

Forum Jump:


Users browsing this thread: 1 Guest(s)