Enigma 78 Posted February 2, 2011 Report Share Posted February 2, 2011 http://img651.imageshack.us/img651/6486/randomvaluetolist.png It does not save a number.I expect to get a number between 1 and 4 in a list.The list remains empty. What am i doing wrong? Quote Link to post Share on other sites
UBotBuddy 331 Posted February 2, 2011 Report Share Posted February 2, 2011 I think this is one of those things whereby you can try it but it does not necessarily works. Sort of like doing numeric calculations in a Text field. Sure you can do it without an error but is it right? The bot I have shows at least three different ways to achieve the same results of your original code. For me, I like option 2.Rand-in-List.ubot Quote Link to post Share on other sites
Enigma 78 Posted February 2, 2011 Author Report Share Posted February 2, 2011 Thanks BotBuddy, Will check it Although i don;t see what's wrong with my code, except that it does not work Quote Link to post Share on other sites
UBotBuddy 331 Posted February 2, 2011 Report Share Posted February 2, 2011 I honestly think that Content field in the Add List node is pure text so when you try using a numeric item like $Rand it does not process it. I may add it to the Enhancement list so it can be checked on. Quote Link to post Share on other sites
Enigma 78 Posted February 2, 2011 Author Report Share Posted February 2, 2011 I honestly think that Content field in the Add List node is pure text so when you try using a numeric item like $Rand it does not process it. I may add it to the Enhancement list so it can be checked on. Yes thanks.Add it to the enhancement list to be able to use text AND numbers. Quote Link to post Share on other sites
Enigma 78 Posted February 2, 2011 Author Report Share Posted February 2, 2011 I think this is one of those things whereby you can try it but it does not necessarily works. Sort of like doing numeric calculations in a Text field. Sure you can do it without an error but is it right? The bot I have shows at least three different ways to achieve the same results of your original code. For me, I like option 2. Workarounds does not work correctly, as it gives 5 when you $rand 1 and 4.So it should give either 1,2,3, or 4 and not 5. 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.