|
Level Editor crashes when keyboard input checked |
Snake Snakes
Member #7,003
March 2006
|
Hello, i seem to have run into a problem with a pet project of mine. Any help would be greatly appreciated. This particular project is a 2D Tile Map. A multi-dimensional array is created and drawn to the buffer (double buffering). This program is the likes of a level-editor in progress. I get the typical (WinXP, "This program has encountered an error and must close, to see debug......blah blah blah") error ONLY when i include the keyboard check for the spacebar. Otherwise, there is no problem.
Specifically, the spacebar will eventually be a toggle for placing a tile on the map. why it does not work is beyond me. perhaps it has to do with how/when i am drawing the map to the buffer? |
gnolam
Member #2,030
March 2002
|
The first thing you should do is to start checking return values. -- |
Snake Snakes
Member #7,003
March 2006
|
I did include code to check for the current state of the variable, however i didn't include it because with or without the "state" checking, it still returns the error. but thank you for the tip! |
ReyBrujo
Moderator
January 2001
|
Moved to correct forum. To help: Download and install DrMinGW, compile your program in debug mode, run and let it crash. When the window appears with the crash report, choose Debug, and see the call stack in DrMinGW. -- |
Arthur Kalliokoski
Second in Command
February 2005
|
As far as I can see, 'ii' & 'jj' haven't been initialized by the loop when you get to them when checking for key_space. They all watch too much MSNBC... they get ideas. |
Snake Snakes
Member #7,003
March 2006
|
thank you for all the replies they helped a bunch! |
|