Subtract from variable, cannot subtract bellow 0
Status: Beta
Brought to you by:
danielbailey
An access violation ocurs if you subtract from a variable to get a result below -1
For example:
$y:float
$y = -1
$y = $y-1
This should change $y to -2 however it just creates an access voilation.
-- The workaround --
You can avoid this happening by making the subtraction in a slightly different way.
For example:
$y:float
$y = -1
$y = $y+(0-1)
This doesn't fail to execute and you do end up with -2.