I have this code
do
delta = GetFrameTime()
RotateCameraLocalX(1,getrawjoystickY(1)*delta*50)
RotateCameraLocalY(1,GetrawJoystickX(1)*delta*50)
inc speed,getrawjoystickz(1)*delta*200
MoveCameraLocalZ(1,speed*delta)
SetObjectPosition(skysphere,getcamerax(1),getcameray(1),getcameraz(1))
Print( ScreenFPS() )
Sync()
loop
When I run it, it will work fine, but then when I make a change, say delta*200 to delta*100, suddenly I get the message "Error:Joystick 0 does not exist" and it will point me to the GetRawJoystickY(1) line. Even if I change the code back the way it was, it won't work. Leave the computer for a few minutes, then it works again. It seems to work all the time if I run debug, and if I compile only, then run the .exe. But when pressing the green arrow, I seem to have a few runs, then the error.
Weird thing is, I am not reading joystick 0, and the docs say that joysticks are numbered 1-8, so the error doesn't make sense to begin with.
Edit to add: I am using AppGameKit Classic 2019.12.16 version