What all should I be checking for with inputs?
I know to make sure there's still a client, and whether in Click() if the usr's mob is still there...
I also know to make sure I put as null|anything to make sure the user can select null, then check to see if the input is null... but what else is there that I should be aware of in terms of little details with making sure the game doesn't generate errors?
How about keeping someone from clicking the same menu more then once? I usually change a variable at the beginning of the input that tells the client if the menus already been opened or not... but this is tedious and time consuming.
ID:269284
May 9 2005, 1:00 pm (Edited on May 9 2005, 2:43 pm)
|
|
In response to Lummox JR
|
|
do you mean for fractionals just round the number off after it's been inputed?
|
With numbers, be sure the number is not negative or fractional--unless those things are allowed.
With items or strings, check to see if the item or string is actually in the list. If it's an item in an inventory, be sure its location is still valid after it's selected. If it's an equipped item but another exists with the same name, choose the other one (at least, in selling/trading/dropping situations).
Lummox JR