hey guys!

im just so frustrated with this error .. more like a bug though

heres a link to all my code on google docs

Source

the bold and enlarged stuff is whats causing the bug

problem is when i add void Platform::set_clips(SDL_Rect platClip[], int i) , i guess something in the void Stick::show() function gets messed and i just dont get how!

because when i remove the Platform::set_clips function, the stickman runs and displays just fine but when i have it there, the stickman is not displayed on the screen at all!

it could also be the set_stick_clips() function.. i just dont know how this is hapeening and so cannot solve it :'(

if there is a solution to this problem please let me know
any help will be greatly appreciated
THANKS :)

Edited 5 Years Ago by evilguyme: n/a

If you want us to try to compile your code then you should post it in code tags in here because most of the formatting is lost when I try to copy paste it from the rtf file.

The big thing that I see, and I'm not sure if its the only problem since I have no images and I don't really wanna re-tab all your code each time you post, is that you have SDL_Rect levelOnePlatform[1]; when you should have it with a size of 50 since that is what you are passing into it when you try clipping it.

This time, you have defined

SDL_Rect levelOnePlatform [1];

but you're still calling

levelOne.set_clips(levelOnePlatform, 50);

which is probably overwriting all kinds of other memory!

wow! i cant believe i missed that.. simple mistakes can screw hours of your time :(

you guys are lifesavers! thanks SO MUCH!!

This question has already been answered. Start a new discussion instead.