Syntax

From Second Life Wiki
Revision as of 08:28, 9 September 2007 by JasonC Bing (talk | contribs)
Jump to navigation Jump to search

Overview and Key

This article is a work in progress

In all the following examples:

Black text indicates text that must be typed or the script won't work Red text indicates text that must be replaced by the text described green text indicates optional text that may be skipped or included depending on your need ____ text indicates optional text that may be skipped or replaced by the text described

These first sections, cover the overall syntax of each line of script. The final section gives a more detailed description of what may be used to replace the red or ____ text in each line of script.

Defining Variables

Other than explanations you might provide, the very first part of every script is where the variables are defined. The variables won't work if they are not defined at the beginning. Essentially, defining variables consists of giving each variable a unique name and defining which of the seven types of variable it is. These lines of script may look deceptively simple and trivial but they are essential to the success of your script. The following is the correct syntax for defining each type of variable.

float x;
integer x;
key x;
list x;
rotation x;
string x;
vector x;

Setting Variables

float x=#.#;
integer x=#;
key x=
list x=
rotation x=<%,%,%,#.#>;
string x="text";
vector x=<%,%,%>;

States, Events, and Triggers

Functions

Other Syntax

Red Text Explanations