newObjects-logo.gif (1024 bytes) ScriptManager2 reference
AddText method

Adds script code to the loaded engine. LoadEngine must be called before any successful calls can be made to this method

variable = object.AddText(code)

variable boolean true if the operation was successful and false if not. Inspect lastError property for the error description - typically this will be a compilation error.
object ScriptManager2 Previously created ScriptManager2 object
code string Script text being added


Code must contain full "closed" script blocks. In opther words you can not add the first half of a function and then the second with later call to this method. You can call this method many times. Thus realization of the includes or another needed fetures can be realized

See also:

C++ Helper SCPHOSTCLNT::AddCode method

newObjects Copyright newObjects 2001-2005