|
Crashing allegro40.dll |
MageMog
Member #2,668
August 2002
|
okay... so I'm not sure that's the name of I only seem to have problems w/ my RPG I made a seperate program and it can can sombody help? I doubt anyone will look at this, but here it The game files: pls pls pls... I can't move on with my project --BTW...
---------------------------------- |
Evert
Member #794
November 2000
|
Before taking a look at your source code, can I run it without any extra datafiles? Some other things you can do yourself: try static linking and try linking against the debug version of the library to narrow down the problem. IMHO, the problem is unlikely to lie with Allegro itself, unless you use an unstable version (which I assume you're not, since all 4.0.x versions are stable releases). |
Plucky
Member #1,346
May 2001
|
The following is going to be critical. I'll try not to be harsh, but if you have a thin skin, then don't read my comments. I looked at your source and almost regretted it. It is very, very difficult to debug because of two very bad practices: 1) Using #include to insert code snippets. You should read up somewhere as to how to handle large projects (basically programming style). Generally programs are split up in a manageable manner with functions and multiple files filled with functions. Instead you have multiple files of code snippets that are inserted with #include. Split out code and especially reusable code into functions. Group similar functions into files. Etc. Code doesn't have to be all in one file. #include was designed for header files, which shouldn't have any code within them . 2) You don't indent. To make matters worse, you have many nested if's and do-while's. This makes following your code next to impossible. As for the bugs, it's not the Allegro library; they're all caused by your code. The following bugs prevent the program from being compiling/linking with MingW or cause crashes as you described (I may have forgotten some):
Some warnings that could cause major problems:
Some things you should/shouldn't be doing:
Unfortunately there are more problems. I strongly recommend reading up on programming style and practice. Read other people's code, like those in Allegro source and projects found on this site. Most of the bugs and programming problems here are as a result of bad style and practice. On a positive note, your demo looks pretty good. |
Blade Nick
Member #1,597
October 2001
|
Yeah that's right I always get a similar error too. But I figured it out just recently the, the order does matter! So make sure to go through the way you initalize everything and also try to indent things a little more. As non indneted code with billions of nesteded if's and for's does get really hard to read and mannage if you can't tell what is what and where is where. Also commenting is really usefull do it lots and lots more as it will help you to understand and every one else to aswell.
Bad Website Of Mine |
MageMog
Member #2,668
August 2002
|
Thanks plucky, that was very thorough responce : ) SWWEEEEEEEEEEEEEEEEEETT ya ya ya!!! thanks... don't worry about my retarded programming
---------------------------------- |
|