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

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

variable = object.AddText(language, 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 ScriptAggregate Previously created ScriptAggregate object
language string Script language of the added script code. The AddEngine must be called before with the same language parameter.
code string Script text being added

Remarks:

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