Check if string is a number
#4

Try this:
pawn Code:
if(inputtext < 12 || inputtext > 120)
But you need to change something else too.
This is full code:

pawn Code:
new input[128];//You need to define the length of the input before formating it.
        format(input, sizeof(input), "%i", inputtext);
        if(inputtext < 12 || inputtext > 120)
        {
Reply


Messages In This Thread
Check if string is a number - by GiS - 08.01.2011, 19:41
Re: Check if string is a number - by Alex_Valde - 08.01.2011, 19:45
Re: Check if string is a number - by GiS - 08.01.2011, 20:00
Re: Check if string is a number - by Alex_Valde - 08.01.2011, 20:06
Re: Check if string is a number - by GiS - 08.01.2011, 20:09
Re: Check if string is a number - by Alex_Valde - 08.01.2011, 20:11

Forum Jump:


Users browsing this thread: 1 Guest(s)