Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Archived

This topic is now archived and is closed to further replies.

  • 0
Gladox114

Testing nummber

Question

I know that "not nil" is wrong but how to test if the input is a nummber and do something when input is a nummber.

 

read = io.read()
if string.match(read, "(%d+)") == not nil then
-- do something
end

 

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.