gamepad axis nil value error
numGamepads = 1 local gp = the.gamepads self.square.velocity.x = gp.axes * 400 self.square.velocity.y = gp.axes * 400
when I try to use the axes values at the beginning of the programm for analog movement I get a nil value error
Crash, main.lua:28: attempt to perform arithmetic on field '?' (a nil value)
when I use the line from the demo
if the.keys:justPressed('m') then self.analog = not self.analog end
and use the axis only later in the game there is no problem.
I seems that the axis are nil on the start of the program
I also took the zoetrope_1.1.love file and changed the line 5 in the tests/gamepad.lua file to analog = true, so that it uses analog movement from the beginning and I get the same error.