Posts: 815
Threads: 127
Joined: May 2011
Reputation:
0
I'm a scripter, but I don't understand why example, if I created a turf, I must destroy it at OnGameModeExit. Is it necessary? Can someone explain more about the OnGameModeExit thing. And I did my GM without destroying the turfs at OnGameModeExit. So will there be trouble? Why must we always destroy something OnGameModeExit or OnFilterscriptExit. Why?
Posts: 929
Threads: 17
Joined: Mar 2012
Reputation:
0
well on filterscripts its for if a script is unloaded but not the hole GM
say you unloaded that filter script with the rcon cmd but that turf will still be there
so you probably want to remove it as it was part of the filter script.
on a GameModeExit it would depend on WHAT your destroying
im not sure of what the server will destroy on its own and what it wont
maybe some others can explain that
but heres the thing if you only have 1 game mode then your onGameMode exit will only be call
when the server is closed using the exit command, in this case you wont have to destroy anything
as closeing the server will surely wipe out the abstract machines memory.
hope this clears it up a bit,
regards
Posts: 1,177
Threads: 27
Joined: Sep 2011
Reputation:
0
You don't have to destroy anything there. When the server starts up again, everything is gone.
Posts: 815
Threads: 127
Joined: May 2011
Reputation:
0
So its not important or necessary? If I'm using a server host, and the server restart's, still not necessary?
Posts: 929
Threads: 17
Joined: Mar 2012
Reputation:
0
if you only have one gamemode then no
if its a filterscript you plan to load/unload using the rcon commands
then yes!
say you have mini games you load by filter script
well you could have many of them and only load one at a time.
So when you unload one to load another
youll also want to delete anything the first mini game loaded.
if your not doing stuff like that and your filterscript stays loaded all the time
then dont worry about it! Because if the server restarts its destroys everything for you
THIS is the beauty of the abstract machine!!