You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm adding structs to a global list var and they seem to be being deleted after a restart, is this intentional and if not is this a known issue? as I couldn't find anything in my code that deletes the structs from the list
and maybe add a warning that they can't be saved across restarts (like skript does with saving entities and inventories and such)
That warning does exist
huh, I'm fairly certain that I did not get a warning about it
Probably because you had it in another var already. The warning only appears when you put a struct directly into a global var and Skript can be certain about it being a struct.
would it be possible to save the data deserialized instead of deleting it, and then having the possibility to serialize it again with something like x struct within {var} so you could do
on load:
set {structs::*} to x structs within {structs::*}
(note that I don't know how any of this actually works so please forgive me if my question doesn't make any sense from the developer's perspective)
Activity
sovdeeth commentedon Apr 10, 2026
They cannot be saved since when variables are loaded, no templates have been parsed, so it's impossible to tell how the data should be unserialized
Thijmen009 commentedon Apr 11, 2026
ah, that's unfortunate. and there is nothing you think would be possible for this (in a future update?)
Thijmen009 commentedon Apr 11, 2026
and maybe add a warning that they can't be saved across restarts (like skript does with saving entities and inventories and such)
sovdeeth commentedon Apr 11, 2026
That warning does exist
Thijmen009 commentedon Apr 11, 2026
huh, I'm fairly certain that I did not get a warning about it
sovdeeth commentedon Apr 11, 2026
Probably because you had it in another var already. The warning only appears when you put a struct directly into a global var and Skript can be certain about it being a struct.
Thijmen009 commentedon May 28, 2026
would it be possible to save the data deserialized instead of deleting it, and then having the possibility to serialize it again with something like
x struct within {var}so you could do(note that I don't know how any of this actually works so please forgive me if my question doesn't make any sense from the developer's perspective)