|
Program crashes when it encounters "screen" |
Zanmoto
Member #8,665
May 2007
|
I use the Dev-C++ compiler, but recently I moved all the files onto another partition, and ever since, my programs crash when they encounter the "screen" bitmap. I have tested this a number of times. Even programs that were working fine, if I altered them slightly, they would crash when I ran them. An example:
This compiles perfectly, but crashes when I run it. |
Dennis
Member #1,090
July 2003
|
--- 0xDB | @dennisbusch_de --- |
Zanmoto
Member #8,665
May 2007
|
Sorry, that's just force of habbit (the ne'er ending loop) #include <allegro.h> int main () { allegro_init (); set_gfx_mode (GFX_AUTODETECT_WINDOWED, 250, 100, 0, 0); install_keyboard (); textprintf_ex(screen, font, 0, 0, makecol(0, 0, 0), 0, "Hello World!"); allegro_exit (); return 0; }END_OF_MAIN ()
|
LennyLen
Member #5,313
December 2004
|
Hint: Heed what Dennis said about checking return values.
|
Zanmoto
Member #8,665
May 2007
|
(missed that comment the first time, damn I'm blind) Finally fixed it thanks to everyones help. I also want to apologise for double-posting. Thanks again. (For anyone who wants to know, the error was caused by an incorrect color depth and resolution, which, until recently, wasn't an issue) |
Dennis
Member #1,090
July 2003
|
Quote: (missed that comment the first time, damn I'm blind) Actually that was my bad. I realized that I forgot that comment after posting and went and edited my post to put it in and you must have read/posted your response while I was still editing mine. --- 0xDB | @dennisbusch_de --- |
Zanmoto
Member #8,665
May 2007
|
haha Still, thanks very much Dennis. |
|