[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Command return, with an 'if' statement used it will be TRUE (1) if condition passes or FALSE (0) if it fails, otherwise if you use a Variable it will be TRUE / FALSE as an integer.
<Value> = This is the item that is having its data type checked.
<Var/Script Data Type> = This is what <Value> is being checked against. This can be a 'datatyp' or another variable.
Returns a [TRUE] or [FALSE] depending on whether or not the data type of <Value> is equal to <Var/Script Data Type>.
Example:
(As menus can not display integers, it can be useful to know if a variable needs to have its data type changed so it can be displayed)
$number = 15 (were 15 is an integer)
if -> is datatyp[ $number ] == DATATYP_INT
| $number.string = convert number $number to string
| add custom menu item to array $menu: text = $number.string returnvalue = null
else
| add custom menu item to array $menu: text = $number returnvalue = null
end
In the above example, if $number is an integer, it will convert it to a string before adding it to the menu for display. If however it is not an integer it will just put it straight into the menu for display.
-------------------------------------
Note:
See at the bottom of here for a list of possible data types.
Command Location:
- »» General Commands
<RetVar/IF> is datatyp[ <Value> ] == <Var/Script Data Type>