gdb says I'm getting a segfault in InputHandler::update when I move the joystick, is it that the if else and for loops are not correctly separated, where do I need to add remove french braces? thanks.
InputHanfler.cpp and all other files of the game engine are included below.
I'm a complete noob and I find nested if else and for statements really hard to debug so any help is greatly appreciated. Thanks.
I tried this adjustment and I'm still getting the error Segfault in InputHandler::update when i move the joystick according to gdb, is there any way i can get gdb to report the exact line of the crash? do the if else for loops need adjusting again? someone one game dev.net mentioned indexed array access and dynamically allocated pointers, where in the program should i be looking for errors regarding these areas? do i need to set up destructors cleaning up all the pointers? Thanks.
I noticed some errors with the < and > signs in Player.cpp handle input and the error has moved down to line 132 m_joystickValues[whichOne].second->setY(0); in InputHandler.cpp, can you spot any errors in Player.cpp handle input? I checked it with the book, if not where should I be looking for my errors, thanks.