dahid84 5 Posted May 14, 2015 Report Share Posted May 14, 2015 I have problem with comparision. List dosen't comparision correct random.txt - have numbers 2,3 DON"T HAVE 1 My plan is :2,3 number going to (exist on the list)1 number going to "NOT exist on the list" PROBLEM IS : always going to exist on the list ;/ even when pickup 1 What is wrong ? Why when random 1 not going "NOT exist on the list" ui stat monitor("Number:", #number)loop(10) { clear list(%random) add list to list(%random, $list from file("{$special folder("Application")}\\random.txt"), "Delete", "Global") set(#number, $rand(1, 3), "Global") if($comparison(#number, "!=", %random)) { then { alert("exist on the list") } else { alert("NOT exist on the list") } }} this is a part of my bot which dosen't work Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted May 14, 2015 Report Share Posted May 14, 2015 try this instead ui stat monitor("Number:", #number)loop(10) { set(#number, $rand(1, 3), "Global") set(#list, "23", "Global") if($contains(#list, #number)) { then { alert(" {#number} exist on the list") } else { alert("{#number} NOT exist on the list") } }} Quote Link to post Share on other sites
dahid84 5 Posted May 14, 2015 Author Report Share Posted May 14, 2015 (edited) thy Code 4repley .... you way is working but my bot have to take list from file and comparise I use HMA to change ip after that i write used IP to .txtIf i random this same ip i would like to skip this used IP This is very importent please help ;] Edited May 14, 2015 by dahid84 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted May 14, 2015 Report Share Posted May 14, 2015 I mashed your codes together to get what I think it is you want: ui stat monitor("Number:", #number) clear list(%random) add list to list(%random, $list from file("{$special folder("Application")}\\random.txt"), "Delete", "Global") loop(10) { set(#number, $rand(1, 3), "Global") if($plugin function("File Management.dll", "$exists in list", %random, #number)) { then { alert("{#number} exist on the list") } else { alert("{#number} NOT exist on the list") } } } Quote Link to post Share on other sites
dahid84 5 Posted May 14, 2015 Author Report Share Posted May 14, 2015 Ty 4 reply guys there is error ;/ http://p0kerfree.blox.pl/resource/error.jpg Quote Link to post Share on other sites
HelloInsomnia 1103 Posted May 14, 2015 Report Share Posted May 14, 2015 Do you have the file management plugin installed and activated? Edit: I didn't realize that wasn't in the code before, you can either grab it here: http://www.ubotstudio.com/forum/index.php?/topic/13237-free-file-management-plugin-multiple-commands-and-functions/ Or use $contains instead Edit: I'm not sure why the image changed but this post was meant for your original error image. Quote Link to post Share on other sites
dahid84 5 Posted May 15, 2015 Author Report Share Posted May 15, 2015 HelloInsomnia you are the best suport in this forum thx Code Docta to ! 1 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.