Only numbers in dialog/inputtext
#5

Or, if you're already using sscanf you can use its "quiet" option for type checking without the need for an extra function. But most of the time you do need to store what was entered and so this also saves you the use of strval.

pawn Код:
if(sscanf(inputtext, "{i}"))
Reply


Messages In This Thread
Only numbers in dialog/inputtext - by hrasch - 15.08.2014, 15:39
Re: Only numbers in dialog/inputtext - by [XST]O_x - 15.08.2014, 15:45
Re: Only numbers in dialog/inputtext - by MicroD - 15.08.2014, 15:47
Re: Only numbers in dialog/inputtext - by SanAndreasMP - 15.08.2014, 15:47
Re: Only numbers in dialog/inputtext - by Vince - 15.08.2014, 15:49
Re: Only numbers in dialog/inputtext - by hrasch - 15.08.2014, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)