Replace List Item
From UBot Studio
(Difference between revisions)
Line 12: | Line 12: | ||
clear list(%my list) | clear list(%my list) | ||
add list to list(%my list,$list from text("blue,white,green,yellow,purple house",","),"Delete","Global") | add list to list(%my list,$list from text("blue,white,green,yellow,purple house",","),"Delete","Global") | ||
− | replace list item(%my list,2,"black") | + | replace list item(%my list,2,"black","Global") |
Latest revision as of 17:49, 6 June 2015
This command is an Advanced List command. This command will replace a list item at a specified position.
List: List containing item being replaced.
Position: Position of the item that is being replaced.
New Item: The new item replacing the removed item.
[edit] Example
clear list(%my list) add list to list(%my list,$list from text("blue,white,green,yellow,purple house",","),"Delete","Global") replace list item(%my list,2,"black","Global")
The list item located at position 2 on the list is "green".
Running the command will remove the list item "green" and replace it with the new list item "black".
Here is the list before the command is run.
Here is the list after the command is run.