Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to stop errors from appearing if player enters a non-int value into textbox?

Asked by
BRAEGON -8
4 years ago

I have recently started making a poker game and I have ran into a problem with the menu. I have a menu set up so that a player can choose the number of chips to enter into the round. I have a textbox with up and down buttons beside it. The player can use the buttons or type an amount into the textbox which will make the script go through the process of checking their balance ext. The problem is if a player enters anything other than an int value then the script wont work. How would I check if the value is an int value?

0
Check the value. Make a table of letters and use gsub to detect and erase it. Or I mean you can make what the say into numbers with tonumber() voidofdeathfire 148 — 4y

Answer this question