Load/save data to storage

My difficulty is with the condition of the existence of data in storage, for example, I have ((WordsA)) and within it I have the groups P01, P02, P03, P04. Is it possible for me to compare all the data at once? For example, I created a read condition, then it appears there (( “iiii” exists in storage “WordsA” )) But this is not working, what am I doing wrong? What is the right way to work?

Exemplo 02
Exemplo 01


The condition checks for existence of group in a storage. “iiiii” is a string that’s saved in the group “P03”.

So the condition should instead be: “P03” exists in storage “WordsA”

So does that mean there is no way to check if (( iiiii )) exists in “WordsA”??? Like, would I have to specify P01, P02, P03?

Correct. You’d have to load the contents of P03 into a variable, and check if “iiiii” exists as a value of that variable.

As @MrMen suggested. You can’t directly check if a value exists in a storage. You’ll need to load it and check the variable.

It might be easier to use an array or structure. Either store the words in an array or create children in a structure with the words as the child names.

You could then either search the array or check if a child of a structure exists or check the value of a child in a structure is say true or false. A structure would be easier than an array for some things although the array tools extension can simplify arrays.

With an array or structure you can put all of the words in one variable and then just save/load that one variable using the JSON format. You could then search that variable or add/remove words.

It all depends on what you’re doing.

Oh yes, I managed to solve the problem, I’m using the inventory system.

1 Like