13 November 2018
entity
parameter and allow reading a script from the filesystem.8 April 2017
compilescript (Commands) | |
---|---|
Type | Corrade progressive command |
Command | compilescript |
Description | The compilescript command compiles a script passed to the command as a string or reads a script from the filesystem and returns any reported syntax errors in case the compilation failed. |
Permissions | inventory |
Parameters | group , password , entity |
Last Changes | C10 - add the entity parameter and allow reading a script from the filesystem. |
The compilescript
command compiles a script passed to the command as a string or reads a script from the filesystem and returns any reported syntax errors in case the compilation failed.
Command | Required Parameters | Required Corrade Permissions | Example |
---|---|---|---|
compilescript | group , password , entity | inventory | llInstantMessage(CORRADE, wasKeyValueEncode( [ "command", "compilescript", "group", wasURLEscape(GROUP), "password", wasURLEscape(PASSWORD), "entity", "text", "data", wasURLEscape( "default { state_entry() { llSay(0, \"yaaay\"); } } "), "callback", wasURLEscape(URL) ] ) ); |
Parameter | Possible Value | Second Parameter | Possible Value | Description |
---|---|---|---|---|
entity | text | Compile a script passed to the data parameter and return the success status and any outstanding compilation errors. |
||
file | path | The path to a file on the filesystem that Corrade runs on. | Compiles a script from the filesystem and returns any outstanding compilation errors. |
Optional Parameter | Possible Value | Description |
---|---|---|
mono | True (default) or False | Whether to compile the script to Mono. |
entity
is set to text
, the data
value containing the script body should be escaped using wasURLEscape
(or similar) to avoid collisions with reserved symbols - however, in case LSL is used to sent the commands, the quotation marks should be escaped such that they do not collide with the quotation marks of the script sending the command.