-
Notifications
You must be signed in to change notification settings - Fork 170
Server Scripting
ArchZombie edited this page Jun 16, 2013
·
23 revisions
The script will execute in a global environment, and the return value of the initial execution is the script
object.
Some non-standard extensions to javascript are present. If you receive an error, you can get a backtrace using .backtracetext. This is assigned when the exception is thrown and it is a string separated with newlines '\n'.
The script functions are properties of the sys object (with one or two exceptions) and they allow you to interface with the C++ code in a safe way.
The script events are called upon the script object. These methods of the script object that are used by the scripengine are called "events". Some events may be stopped with sys.stopEvent()
.