Checking if a variable is a number
#5

After IsNumeric check, make the line this way:

pawn Код:
if(strval(inputtext) == PlayerInfo[playerid][Bankdeposit] || strval(inputtext) < PlayerInfo[playerid][Bankdeposit])
Why, because inputtext is STILL a string, right?

strcmp to compare strings, == for ints.
Reply


Messages In This Thread
Checking if a variable is a number - by slymatt - 25.07.2011, 17:19
Re: Checking if a variable is a number - by Skylar Paul - 25.07.2011, 17:22
Re: Checking if a variable is a number - by iPLEOMAX - 25.07.2011, 17:45
Re: Checking if a variable is a number - by slymatt - 25.07.2011, 17:48
Re: Checking if a variable is a number - by iPLEOMAX - 25.07.2011, 17:57
Re: Checking if a variable is a number - by slymatt - 25.07.2011, 18:03
Re: Checking if a variable is a number - by Dudits - 25.07.2011, 18:18
Re: Checking if a variable is a number - by slymatt - 25.07.2011, 18:19
Re: Checking if a variable is a number - by Libra_PL - 25.07.2011, 18:47
Re: Checking if a variable is a number - by slymatt - 25.07.2011, 18:52

Forum Jump:


Users browsing this thread: 1 Guest(s)