I'm working on a system that saves all the instances of an object, by pushing each of their json value to one global variable.
For example like this: json1/json2/json3/
The reason I'm doing this instead of simply using the savegame feature is because I have an event that deletes the json value of an instance when it contains a certain instance variable.
For example if a sprite has an instance variable 'Delete' set to true, that will be shown in its json value and by using the find() expression I can delete all json values that contains that.
Which is what I tried:
'TaskCardsSave' is the global variable and "359499435322149" is the instance variable value I'm looking for.
In theory, it will look at each of the json values and check the value of the instance variable. If it is empty, it remains. If it contains something, the whole json value and the "/" attached after it gets replaced to "".
But for some reason all the other "/" in the global variable gets deleted as well, which makes it unable to be read.
e.g.)
What's supposed to happen: json1/json2/json3/ -> json1/json3/
What actually happens: json1/json2/json3/ -> json1json3
need help plz