Best way to detect if players entered text is only digits?
#4

If you are using sscanf, then it's just
pawn Код:
if(sscanf(yourstring, "{dddd}")) //fail
Otherwise, something like
pawn Код:
for (new i = 0; i != MAX_PIN_DIGITS; ++i) if(!('0' <= input[i] <= '9')) //fail
//Beaten by fast typers
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)