After leaving my game on for about 1-2 minutes, I get "-abort() has been called" and in the console window it says "Assertion failed: bitmap, file allegro-git/src/bitmap.c, line 315". I think that it may have something to do with the coin collide functions, but I'm not 100%.

Thanks for the feedback, but I changed the NULL to a 0 and it didn't work.

That is not what I meant. Your al_load_bitmap calls are likely failing, and returning NULL. You want to check for that as the drawing calls will assert and die if they get a NULL rather than a valid pointer to a bitmap.

I think its glitching out somehow. I removed the the draw coin functions so now I just draw normally. Got the same error, still line 315, so I fill line 315 with a bunch of whitespace. Same error, same line?

I think its glitching out somehow. I removed the the draw coin functions so now I just draw normally. Got the same error, still line 315, so I fill line 315 with a bunch of whitespace. Same error, same line?

That's because it's referring to the line 315 in allegro-git/src/bitmap.c, not your source code. If you open the mentioned file, line 315 should look like this:

Which means that somewhere in your code, you are passing a NULL bitmap into that particular function. If you're using a decent IDE, you should be able to look at the stack trace and identify which line in your code that is triggering the assert. Otherwise, you will have to assert that each of the bitmap you loaded is not NULL (NULL is returned if the bitmap failed to load, most probably because it's missing). For example:

DJLad16, mind me, that's not a sollution. I was merely making you check for failures in your coin drawing in a way it would be visually more obvious. The true sollution, as Thomas said, is checking if your bitmaps are NULL after creation.

If the code worked, either of two things are happening:

1) Your coin bitmap could not be created properly. Maybe the file is in the wrong format, or in the wrong path. The sollution is to check your bitmap for validity after creating.

2) The bitmap is created properly, but it is destroyed somewhere before drawing. The sollution is to check for validity before drawing.

For both, you have to act accordingly after checking(Either by finishing the application, or by doing something to make it obvious the error is happening(Such as drawing a circle where the coin should be)).