#How to get a variable based on a user input or alternative storage ideas

1 messages · Page 1 of 1 (latest)

prisma ginkgoBOT
#

<@&987246399047479336> please have a look, thanks.

inland nebula
#

Hi so i have a file full of objects that just store a load of data i need. I want to be able to input a string into a getter in another file and get the corresponding object and stuff but i have absolutely no clue how.

I think i might just be being a bit daft but help would be great! or any suggestions on how else to do this.

#

The end point is the user will need to be able to enter a station name and i need to be able to access its code and lines that its on so.

#

I decided to have it seperate from main just for easability reasons but if that wont work then fair enough.

green mortar
#

you'd loop through the array & compare stationName with the name of each station @inland nebula

inland nebula
#

Theres like, 50 of the objects like that one in the screenshot i just couldnt fit them all in. I need to get the object completely to be able to use it in the rest of the program. Im thinking i just need to rethink the design.