-
Notifications
You must be signed in to change notification settings - Fork 171
Deprecated Server Script Functions
MaribelHearn edited this page Nov 6, 2015
·
14 revisions
Scripting/Server/Functions/Deprecated
These functions are old and shouldn't be used, but they are kept so old scripts continues to work.
sys.setTimer, sys.unsetTimer, and sys.unsetAllTimers do everything this massive conglomerate of functions did.
-
sys.callLater(script, seconds)runs the script given in parameter seconds later. -
sys.callQuickly(script, milliseconds)works likecallLater()but accepts milliseconds as parameter instead of seconds. Don't overdo it. -
sys.delayedCall(func, seconds)works likecallLater()but accepts a function without arguments as a first parameter instead of a string. sys.quickCallsys.intervalTimersys.intervalCallsys.stopTimer
On windows, storing things in the registry is not a good idea, all servers on a username share this namespace! At least on other operating system's it's stored in a file, but this isn't guaranteed!
The current, non-deprecated functions all start with a new argument filename which is the file used to store the configuration settings.
-
sys.getVal(key)returns the variable stored in the registry with that key. -
sys.saveVal(key, value)saves a variable in the registry so it'll still be there after a server restart. -
sys.getValKeys()returns an array of keys stored (without values) in the registry. -
sys.removeVal(key)deletes the variable in the registry.
Functions that for some reason already exist under another name.
sys.getServerPlugins()sys.addPlugin(const QString &path)