Cornysz Posted November 13, 2018 Share Posted November 13, 2018 for exmpl my prompt has 100 maximum and 1 minimum so when i input the prompt 101 it will send an error, and if i input the prompt 0 it will send an error too. How to make like this? i already tried many times but always got error. thanks Link to comment Share on other sites More sharing options...
Administrators Enyby Posted November 13, 2018 Administrators Share Posted November 13, 2018 Get input data and check in code as you want. Link to comment Share on other sites More sharing options...
Cornysz Posted November 13, 2018 Author Share Posted November 13, 2018 can someone give me example the code? Link to comment Share on other sites More sharing options...
Administrators Enyby Posted November 13, 2018 Administrators Share Posted November 13, 2018 Use forum search. This code already be there. Link to comment Share on other sites More sharing options...
maulz Posted November 13, 2018 Share Posted November 13, 2018 I try to help you, but i don't how this script error test.lua Link to comment Share on other sites More sharing options...
Cornysz Posted November 13, 2018 Author Share Posted November 13, 2018 I try to help you, but i don't how this script errortest.luaThanks for helping me, but when i input 5 alert me error. Link to comment Share on other sites More sharing options...
CmP Posted November 13, 2018 Share Posted November 13, 2018 1 hour ago, maulz said: I try to help you, but i don't how this script error test.lua Convert strings to numbers before comparing them. Otherwise, it will produce not the result that was expected (just like in your code). More info about relational operators in lua: https://www.lua.org/pil/3.2.html Link to comment Share on other sites More sharing options...
Cornysz Posted November 14, 2018 Author Share Posted November 14, 2018 Convert strings to numbers before comparing them. Otherwise, it will produce not the result that was expected (just like in your code). More info about relational operators in lua: https://www.lua.org/pil/3.2.htmlCan you give me an example? I already tried but still error :/ Link to comment Share on other sites More sharing options...
maulz Posted November 14, 2018 Share Posted November 14, 2018 Fixed. test.lua Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.