#Using a list as temporary Storage?
1 messages · Page 1 of 1 (latest)
like I want to try use a list to store strings
- your
list createdoesn’t have anything so it gonna output “error”
- If you wanna store things use a
String list variablemake sure you set it to cloud
for what I am doing I dont want to use a variable
What are you trying to do
Yup
Oh no…. The god of circuits it’s here (just hand this off to him 🫸✉️ —>)

Any list modifying chips like List Add or List Set Element only work on list variables, not read only lists
List Create is a read only list, it reads the input values and outputs them in order as a list
Get All Players is a read only list, it reads all players in the room and outputs them in order from oldest to newest
ok so is there Anything other than using a variable
Everything is working as intended, minus the list variable
If you want to initialize a list variable to some already made list like a List Create, just set the list variable to that list create
Im trying to set an element to something so I can read it again when its needed
what is the list set element for if its not related to setting the element of a list to something else
Yes
First, set the List<String> Variable to the List Create
This will set the list stored inside the List<String> Variable to the list output from the List Create
Now that you have done that, you can use List Set Element to set the element at a certain index to a certain value in the List<String> Variable
This im confused by the wording
Yes!
When executing the input execution on the List<String> Variable, it will set the list stored inside to a copy of the list output from the List Create
Because you have a blank list create, it will clear the list stored inside the List<String> Variable when executed
Remember that variables with the same name store the same values
Congradulations, you have learned step one of lists
You will learn lists very quickly, and could possibly learn advanced list optimization in the future, being able to store insane amounts of data for very low CPU
so will this reset all of them
i love lists
like clear all of the indexes?
No, this will set the List<String> Variable to a List<String> containing 1 blank string
The List Create needs to have no inputs in order to set the variable to a blank list
Correct
Remember that variables of the same name will store the same values
This is why you should rename your variables
I’m pretty sure it just makes an empty list
yeah ima rename it
I understand what this is now
man my head was gonna die if I did something else so ty for the help 
Here is a weird issue you are going to run into with lists
If you have 2 list variables, im going to call "A" and "B"
If you set variable "A" to variable "B", and modify either A or B, both will be modified and store the same values
This is because they are not copying lists from each other, they are storing the same reference to the same list
If you want variable "A" to store a copy of variable "B" and not a reference to variable "B", you need to use the chip List Copy, which outputs an identical list with a different reference
Why can’t he just put the list concat into the list create then into the list variable?
I’m genuinely just curious
Not to go against your work
Why would you? List Concat would cost more CPU
The reason we used List Concat before is because List Copy didnt exist, but now it does, so you dont need to use List Concat to create a new reference anymore, you can just use List Copy
I know that setting the "float variable" on this one will set it to both of the lower two but wont set it to the top one, vice versa for the "float Variable 2"
forgot to send oops
Oh, this thing ONLY applies to list variables, not to regular variables
you replied to my sentence talking about a weird interaction between list variables
If you were referring to me talking about variables of the same name storing the same value, here is how they are "grouped" base on their names