Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2008
    Posts
    47

    Debug Assertion Failed

    Okay, so, I managed to get over my earlier problem I had, which appeared to come from that circular thing with the includes...but now I have a runtime problem. Whenever I try to kill a certain enemy (not sure which one, but it's just one of them...it seems as though I can kill two of them, just not the third one, but it depends, it seems.) it gives a "Debug Assertion Failed" dialog box. It says that Iter is not decrementable, and if I switch it to increment, it says it's not incrementable. The code I have appears to be identical to that in the VTM, so I have no clue what's wrong. I guess I'll post my code where the problem appears to stem from:

    Code:
    void Level::update(void)
    {
    	//process non-user input movement
    	for (Iter = npc.begin(); Iter != npc.end(); Iter++)
    	{
    		(*Iter)->idleUpdate();
    
    		if ((*Iter)->isAlive() == false)
    		{
    			Sprite *temp = *Iter;
    
    			Iter--;
    			delete temp;
    			npc.remove(temp);
    		}
    	}
    }

  2. #2
    Join Date
    Aug 2004
    Location
    little rock arkansas
    Posts
    3,482

    Talking

    Have you looked at the updates in the Thread of Information (it is stickied)
    ME WANT AGENTS ME WANT AGENTS ME WANT AGENTS

  3. #3
    Join Date
    Aug 2008
    Posts
    47
    Quote Originally Posted by ostamo2 View Post
    Have you looked at the updates in the Thread of Information (it is stickied)
    Ah, thanks, that fixed it!

    ...but I still have another problem. :P

    When I fire a fireball right next to a wall, directly into it, it erases the sprite. I can't move into the wall, but the sprite is gone and there's no indication that it's there at all. Is that supposed to happen, or did I just do something wrong?

  4. #4
    Join Date
    Jul 2008
    Location
    Oak Lawn, IL
    Posts
    8
    If it disappeared that doesn't mean it's not there, to solve your problem, you have to check if there is wall or not before firing the fireballs at the same coords.. Edit: Oh, and if there is a wall, simply cancel firing the fireball..
    Last edited by Rebel_X; 11-15-2008 at 08:30 AM.

  5. #5
    Join Date
    Aug 2004
    Location
    little rock arkansas
    Posts
    3,482

    Talking

    Did you add all the Code for VTM 3 from the thread of Information?
    Some of it will be EXTRA code in preparation for the wxWidgets VTMS 4 and 5
    it may resolve some of your issues .
    ME WANT AGENTS ME WANT AGENTS ME WANT AGENTS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •