Dialog Response
#2

Are you using sscanf in your script?
If you are, use this:
Код:
new weaponid;
if (sscanf(inputtext, "i", weaponid)) return // Inputtext is not a number
And then use weaponid instead of strval(inputtext).

Also, you shouldn't use functions that much in an if statement. Use switch instead:
Код:
switch (weaponid)
{
    case 0..5: // If weaponid = 0 or 1 or 2 to 5
    {

    }
}
If you aren't using sscanf, search for a function called "IsNumeric" to check if it's an actual number.
Reply


Messages In This Thread
removed - by TracerX - 13.07.2016, 15:23
Re: Dialog Response - by Stinged - 13.07.2016, 15:59
Re: Dialog Response - by Sjn - 13.07.2016, 16:07
Re: Dialog Response - by Konstantinos - 13.07.2016, 16:15
Re: Dialog Response - by Sjn - 13.07.2016, 16:20
Re: Dialog Response - by NaS - 13.07.2016, 16:29

Forum Jump:


Users browsing this thread: 2 Guest(s)