Variable error

BlitzMax Forums/BlitzMax Beginners Area/Variable error

I am using the irrlicht mod. I tried adding a float value to a variable but get the error "Unhandled Exception:Unhandled Memory Exception Error".

The problem is "AniFr:Float".
Global AniFr:Float = 1	'Next Frame

'Render loop
While( device.run())
	If ( device.isWindowActive())
		
		'Initiate Device
		Vid.beginScene( True, True, SColor.createFromVals( 255, 0, 0, 0 ))
		
		'Update Animation
		If AniFr < 1
			AniFr = AniFr + Double( 24 / FPS )
		Else
			AniFr = AniFr - 1
		End If


Produce a proper runnable (or crashable) example

Probably division by zero. Even in debug mode this is reported as an unhandled memory exception.

Thank you that must be it. Thank you :D