kate 5 Posted August 29, 2016 Report Share Posted August 29, 2016 (edited) Hi Code: ui text box("Test Value",#test) ui button("Test 1") { if($is number(#test)) { then { alert("Yes its number") } else { alert("It should be number") stop script } } } ui button("test 2") { if($comparison($is number(#test),"= Equals",$false)) { then { alert("It should be number") stop script } else { alert("Yes its number") } } } This test to prove $is numberreturn value is not same as $comparisonreturn value image:http://i.imgur.com/ANRPIkp.pngi cant find doc on this, hope it helps others. ( btw, is it bug ? ) Edited August 29, 2016 by kate Quote Link to post Share on other sites
pash 504 Posted August 29, 2016 Report Share Posted August 29, 2016 no. it not bug. run it. alert("What are the differences {$is number("x")} {$false}")If you want the same results. ui text box("Test Value",#test) ui button("Test 1") { if($is number(#test)) { then { alert("Yes its number") } else { alert("It should be number") } } } ui button("test 2") { if($comparison($change text casing($is number(#test),"Lower Case"),"= Equals",$false)) { then { alert("It should be number") } else { alert("Yes its number") } } } Quote Link to post Share on other sites
kate 5 Posted August 29, 2016 Author Report Share Posted August 29, 2016 pash thank you for pointing me that. In future if somebody need documentation, they can find it here maybe because "is number" is bot bank command so there's different way to say true/false Quote Link to post Share on other sites
kate 5 Posted September 16, 2016 Author Report Share Posted September 16, 2016 check also what python says about True/False http://network.ubotstudio.com/forum/index.php/topic/19842-miscellaneous-tips/?do=findComment&comment=124260 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.