tee3141 0 Posted November 12, 2013 Report Share Posted November 12, 2013 I have a following code that were working when on 4.2.16, but once upgrade to 5.0, not work anymore. add list to list(%lines, $list from file(#pidsFile), "Delete", "Local") set(#line, $list item(%lines, 0), "Local") I changed to do the following instead and it works set(#line, $read file(#pidsFile), "Global") I was not able to find any documentation about the change, anyone can help here? Also, for the following code, what shall I do to make it work? clear list(%pids) add list to list(%pids, $find regular expression(#line, "[0-9]+"), "Delete", "Local") set(#pid, $list item(%pids, 2), "Local") The content of the file is very simple - one line with a set of numbers separate by space character like the following 1364 2630 1988 475 Quote Link to post Share on other sites
MMD 7 Posted November 12, 2013 Report Share Posted November 12, 2013 Please submit your issues to http://tracker.ubotstudio.com/projects/ubot-5P/S: Like a staff Quote Link to post Share on other sites
beatngu 65 Posted November 12, 2013 Report Share Posted November 12, 2013 You should revert back to ubot 4 to save a lot of time and headaches.Ubot 5 has too many bugs and most of the users are still using ubot 4. Quote Link to post Share on other sites
MiriamMB 63 Posted November 12, 2013 Report Share Posted November 12, 2013 I have a following code that were working when on 4.2.16, but once upgrade to 5.0, not work anymore. add list to list(%lines, $list from file(#pidsFile), "Delete", "Local") set(#line, $list item(%lines, 0), "Local") I changed to do the following instead and it works set(#line, $read file(#pidsFile), "Global") I was not able to find any documentation about the change, anyone can help here? Also, for the following code, what shall I do to make it work? clear list(%pids) add list to list(%pids, $find regular expression(#line, "[0-9]+"), "Delete", "Local") set(#pid, $list item(%pids, 2), "Local") The content of the file is very simple - one line with a set of numbers separate by space character like the following 1364 2630 1988 475 Both your lists and your variables are local. Local lists and variables do not show up in the debugger in all versions (UBot 5, 4.2.20, 4.2.16 as you mentioned) This is to allow you to create multiple variables and lists with the same name without causing confusion. The local variables are recommended for Defined commands and threading purposes. If you set your lists and variables to Global, and you set a variable for #line with a value for the find regular expression, your scripts will run without issue. clear list(%pids)set(#line, 1234, "Global")add list to list(%pids, $find regular expression(#line, "[0-9]+"), "Delete", "Global")set(#pid, $list item(%pids, 0), "Global") Feel free to let us know at support.ubotstudio.com if you run into any more confusion. We'll do our best to clarify it for you. Quote Link to post Share on other sites
bobstratton 2 Posted November 15, 2013 Report Share Posted November 15, 2013 I put each of my items in my file on a separate line and am able to add the file to a list in v5 with no problem. 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.