#Using a list as temporary Storage?

1 messages · Page 1 of 1 (latest)

buoyant violet
#

I’m very confused on what your trying to make…..

torn dirge
#

like I want to try use a list to store strings

buoyant violet
#
  1. your list create doesn’t have anything so it gonna output “error”
torn dirge
#

ikt but creating a list with a string will leave a blank output

#

if I get any element

buoyant violet
#
  1. If you wanna store things use a String list variable make sure you set it to cloud
torn dirge
#

for what I am doing I dont want to use a variable

buoyant violet
#

What are you trying to do

torn dirge
#

store strings in a list

#

no

#

just that instance

buoyant violet
#

OH i’m silly

#

Put the String Conact into the list create

torn dirge
buoyant violet
#

Yup

torn dirge
buoyant violet
#

Oh no…. The god of circuits it’s here (just hand this off to him 🫸✉️ —>)

torn dirge
flat flicker
#

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

torn dirge
#

ok so is there Anything other than using a variable

flat flicker
torn dirge
#

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

flat flicker
torn dirge
#

This im confused by the wording

flat flicker
torn dirge
flat flicker
# torn dirge

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

torn dirge
#

ty lmao

flat flicker
# torn dirge omg

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

torn dirge
#

so will this reset all of them

flat flicker
#

i love lists

torn dirge
#

like clear all of the indexes?

flat flicker
torn dirge
#

oh mb i forgot to remove that

#

this would..?

flat flicker
flat flicker
# torn dirge

Remember that variables of the same name will store the same values
This is why you should rename your variables

slow night
buoyant violet
#

I understand what this is now

torn dirge
#

man my head was gonna die if I did something else so ty for the help 5844_partyparrotcrazy

flat flicker
# torn dirge yeah ima rename it

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

buoyant violet
#

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

flat flicker
torn dirge
#

forgot to send oops

flat flicker
torn dirge
#

Oh i might have read something wrong

#

mbmb

flat flicker
# torn dirge Oh i might have read something wrong

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

torn dirge
#

yeah I reread your ping and I was confusing it for something else

#

anyway cheers