JensH 0 Posted February 25, 2014 Report Share Posted February 25, 2014 I'm trying to read a variable from a list item: Set(#MyValue, $list item(%MyList, 0), "Global") The debugger shows that %MyList contains items but I get this error message: Script Error: invalid map <K,T> key Source: > > Set What am I doing wrong? Quote Link to post Share on other sites
UBotDev 276 Posted February 25, 2014 Report Share Posted February 25, 2014 Are you using v5? It sounds like a v5 problem, since I never saw this in v4. If so I would suggest you contact the support or open an issue here: http://tracker.ubotstudio.com/ Quote Link to post Share on other sites
JensH 0 Posted February 25, 2014 Author Report Share Posted February 25, 2014 (edited) Thanks for your fast reply. Yes, I'm running 5.0.7 Does this mean there's no solution except to downgrade? Edited February 25, 2014 by JensH Quote Link to post Share on other sites
Bot-Factory 602 Posted February 25, 2014 Report Share Posted February 25, 2014 I'm trying to read a variable from a list item: Set(#MyValue, $list item(%MyList, 0), "Global") The debugger shows that %MyList contains items but I get this error message: Script Error:invalid map <K,T> keySource: > > Set What am I doing wrong? Could you please post the data that is stored in your list item?Maybe it has something to do with what you have in the list item. I can test it here on my side. Dan Quote Link to post Share on other sites
JensH 0 Posted February 25, 2014 Author Report Share Posted February 25, 2014 (edited) Thanks, Dan. My list items do look like this: B00FY7NCPOMartinMolsted and I try to set them like this: Set(#MyValue, $list item(%MyList, 0), "Global")Set(#MyValue1, $list item(%MyList, 1), "Global")Set(#MyValue2, $list item(%MyList, 2), "Global") Edited February 25, 2014 by JensH Quote Link to post Share on other sites
Bot-Factory 602 Posted February 25, 2014 Report Share Posted February 25, 2014 I just tried: set(#tmp, "B00FY7NCPOMartinMolsted", "Global")add list to list(%test1, $list from text(#tmp, $new line), "Delete", "Global")set(#test1, $list item(%test1, 0), "Global")set(#test2, $list item(%test1, 1), "Global")set(#test3, $list item(%test1, 2), "Global") And that works fine in V5 and in V4. Is that one giving you the same error? Dan Quote Link to post Share on other sites
JensH 0 Posted February 25, 2014 Author Report Share Posted February 25, 2014 No it isn't. I'm going to change my source code to fit your syntax now. Thank you for helping a newbie Quote Link to post Share on other sites
Bot-Factory 602 Posted February 25, 2014 Report Share Posted February 25, 2014 Sure no problem. If you still run into issues, please let us know. Dan Quote Link to post Share on other sites
UBotDev 276 Posted February 25, 2014 Report Share Posted February 25, 2014 Thanks for your fast reply. Yes, I'm running 5.0.7 Does this mean there's no solution except to downgrade?If you are a newbie I would suggest you downgrade, since your learning experience will be more pleasant. v5 still has a lot of bugs so I believe a lot of times you won't know if the problem is in your code or it's actually a bug. Or at least get v4 so you can test the code in it, if you are having problems in v5. No matter what you have in your list that code should work! 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.