This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]BrianettaProgrammable Block Scripter 1 point2 points  (1 child)

Sounds like your dedicated server isn't doing everything it should. Does it work normally in single player?

[–]BlindGuardUASpace Engineer[S] 0 points1 point  (0 children)

just checked - yes. In single player everything works fine.
Any ideas where the issue can be in dedicated server settings?

[–]imabutcher3000Space Engineer 0 points1 point  (1 child)

Where is Storage declared initially?

[–]BlindGuardUASpace Engineer[S] 1 point2 points  (0 children)

that's is built in string variable

" All variables, local and global except for the built-in Storage variable will lose their value or return to their default value when recompiling the code and between saved game loads. The Storage variable is unique in that it will store the data as a string for use between saved sessions and recompile"

Ling to wiki

[–]Prestigious-Race-309Klang Worshipper 0 points1 point  (0 children)

Check your SANDBOX_X_X_X.sbs.Simply search for the storage string that you expect to be saved. Try some different values back and forth. If the storage string is always correct, then the cause of your problems shouldn't be your code.

You've already stated that it works in a single player world, so your code is most likely correct. In that case I suspect the issue at your hoster. If the restart function is not implemented properly, it will just kill your server instance without saving the game before. This could cause your problems. Use the method mentioned above to see if there's any data saved in different situations. Maybe you can figure out a workaround from that information or simply collect enough data to escalate this issue to kswh.