maBOT 10 Posted February 26, 2021 Report Share Posted February 26, 2021 Hello Ubotters, After spending some hours to get it work, I decided to consult with you regarding an issue that I'm getting with some basic things. It could be that I'm just tired, but I can't determine what causes the problem.. Let's get to the point. I have such code: if($contains(#currentBotModule,"module1") OR $contains(#currentBotModule,"#module2") OR $contains(#currentBotModule,"#module3") OR $contains(#currentBotModule,"#module4") OR $contains(#currentBotModule,"#module5")) { then { module basic() } else if(ANOTHER MODULE FUNCTION) } else if(ANOTHER MODULE FUNCTION) } else if(ANOTHER MODULE FUNCTION) } else { } } I have the function modulesList which is being initialized before the above one, which specifies the module1, module2.. module5. E.g (apple, pear,..orange) The function currentBotModule is also being initialized before the above one at some point. (e.g. appleJuice, pearJuice,.. orangeJuice) I checked in debugger and everything seems fine, but when it's being ran, it simply doesn't work but goes to else if command while it should run the module basic. When I type in and replace module1 as its real value, (e.g. "apple") then it does work. Anybody knows/sees what is causing the problem here? If you have some advice on how to make this possible w/o using OR, with either function perhaps, please suggest. Thanks in advance guys! 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.