SAL script language has a standard assortment of different variables found in any other scripting or programming language.

Integer Whole number int number ;
int number = 1 ;
Floating point number Decimal number float decimal ;
float decimal = 1.05 ;
Float triplets A series of three floats (position coordinates) float3 position ;
float3 position = 250.5 100.1 5.326 ;
String Character string (object keyname) String variables cannot be declared prior to use in function.
Use strings directly in a function!
GetByKeyName ship0

Naming variables is easily done as seen in the above code examples. First declare variable type and then its name. Assigning a value to a variable is done with the "=". Don't forget the spaces between keywords and characters!


The goal of this script is to set Hull of the ship with the keyname adastraSHP to 250.0.

	float hull = 250.0 ;
	ship GetByKeyName adastraSHP SetHP hull ;

Declare a variable before using it!

For more information on script functions see FUNCTIONS section

Using Notepad++ for scripting is advised. For more information see DOWNLOADS section