BlitzScript3D is virtually typeless. Variables can be assigned strings, integers, or floats without any datatype indicator.
A Integer value will be treated like string until a math operation is performed with it. When a math operation is performed, its treated like a float. So, if you need to evaluate a integer after a math operation has been performed, include a decimal point (ie: 12.0).
BlitzScript3D also features a special global array 'BlitzScriptVar' that can be assigned values and accessible in both script and application using the following commands:
BlitzScriptVar provides a simple mechanism to share data between the script and application directly. The current maximum number of BlitzScript Variables is 32, however, this value can be increased in the scripting engine source bscvmVar.bb.
Lock and Unlock
Variables are used to store handles for a SubScripts and Labels. These values are sensitive and can result in script failure if accidently overwritten. To prevent accidental overwrite, BlitzScript3D offers a means to protect the values stored in variables using Lock and Unlock Keywords.
if b=100.0 then
if b=500.0 then
Lock/Unlock Keywords can be applied to any Variable.
Variables are automatically scoped as 'public', or 'private' dependent on where they are declared. Public Variables are declared outside a function and can be used from anywhere in the program. Private Variables can only be used within the function they are created in. Functions are not implemented at this time.