Having an issue with this simple loop showing up an error. For reference im using a Logitech g502 lightspeed.
1. function OnEvent(event, arg)
2.
3. if (event == "MOUSE_BUTTON_PRESSED" and arg == 8) then
4. PressAndReleaseKey("spacebar")
5. repeat
6. MoveMouseRelative(0,3)
7. Sleep(5)
8. until not IsMouseButtonPressed(8)
9. end
10.
11. end
Lua Error (8): invalid argument Line Number:8
I have also tried "while IsMouseButtonPressed(8) do"
For some reason this works flawlessly when I bind it to mouse button 1, but stops working when I bind it to mouse button 8. Not sure if its a software limitation. Any help would be much appreciated!
Edit: I have read that "IsMouseButtonPressed()" only works on buttons 1-5. Does that mean its not possible to put a loop on button 8?