Check if is numeric
#1

Is there any way to check if "params" from dcmd is a number?
Reply
#2

I recommend using Sscanf if you arent already.

https://sampwiki.blast.hk/wiki/Sscanf
Reply
#3

Yes I am using it but how do I check if it's a number?
Reply
#4

if(sscanf(params, "d", YourVariable)) SendClientMessage(playerid,color,"Must be a number.");
Reply
#5

Thanks a lot, that works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)