Quote:
Originally Posted by Jochemd
No problem :P
|
Actually it is, IsNumeric it's not for converting a string to integer, it checks if the input is numeric!
Insert ABCD, and using strval on the ABCD string may result in a strange long number.
So i suggest you to use IsNumeric, because the one who is gonna send you the Race Reqeust, he might wanna insert
3e by accident. So guess what happens. Error, or crash.
Here , use this.
pawn Код:
else if(dialogid == 3)
{
if ( response ){
if ( !IsNumeric ( inputtext ) ) return SendClientMessage(...); //ERROR No-Number inserted.
if ( !strlen ( inputtext ) ) return ShowPlayerDialogEx(playerid, 3);}
else SendClientMessage(playerid, COLOR_GREY, "[Error:] You have cancelled the request!");
}
You can also try using sscanf, which will check if the player is connected, and it will ease your job by almost 60%.