Log in

View Full Version : Serialization of the game world



foxtacles
12-29-2012, 05:38 PM
gary 2.6 has two important new callbacks:

OnServerInit
OnServerExit

They can be used to fill the game world with objects (items, containers, NPCs) and to save them upon server shutdown. OnServerInit gets called immediately after main / exec, and OnServerExit gets called if the server encounters an error or is being shutdown using the 'exit' command.

Aeronix
01-07-2013, 07:22 AM
That's nice, will OnServerExit be called if the server crashes and will it be called if a small error occurs?

foxtacles
01-07-2013, 03:52 PM
It will be called when the server exits or crashes.

Smoria
01-07-2013, 05:00 PM
It will be called when the server exits or crashes.
OnServerExit not gets called when i close server console by clicking X

foxtacles
01-07-2013, 05:17 PM
OnServerExit not gets called when i close server console by clicking X

That is correct. I may change this, but you should always exit the server by typing 'exit' in the console.