Jump to content


the artist

Member Since 18 Jul 2008
Offline Last Active Jan 16 2011 01:40 AM

Posts I've Made

In Topic: Memory Leak? Constant crashing.

28 December 2010 - 02:35 PM

You should subtract 1 froom cc at the same time as you add 1 to y... So...

while (!place_meeting(x,y+1,ob_parentbuilding) and cc>=0)
{
y+=1;
cc-=1;
}

You create the counter, but donīt actually use it for anything, and so it will ALWAYS be greater than 0 (if vsp>0 then cc must be at least 1) so the "while" is an infinite loop as it is always checking the cc variable. So count it down as I show above...


Ah, I see it now. It's working now and not crashing, thank you very much for the help.

In Topic: Memory Leak? Constant crashing.

27 December 2010 - 09:55 PM

I think this is the piece of code that is causing the crash. When I remove it the game doesn't crash at all!

I just need to understand why this makes it crash; I'm a little confused :S

if (place_meeting(x,y+vsp,ob_parentbuilding) and vsp>0)
{
    //Move so we hit the ground
    var cc;
    cc=vsp+1; //A counter, so we don't get an infinite loop

     //Move down until we hit the floor
    while (!place_meeting(x,y+1,ob_parentbuilding) and cc>=0) y+=1;

     //Now ground the player
    grounded=true;

    vsp=0;vspeed=0;gravity=0
}

In Topic: Memory Leak? Constant crashing.

27 December 2010 - 09:42 PM

I am going to start looking through all my code for anything such that has been mentioned.

thanks

In Topic: Can't figure this collision problem out! :|

22 December 2010 - 11:29 AM

c_raethke: thanks for the help but I have it figured out now :D
here's the code as it works now.
{
  if (vspeed > 0 && not place_free(x,y+vspeed))
  {move_contact(270)jumping=false; if place_meeting(x,y+vspeed,other) vspeed=0;}
  
  if place_meeting(x+sprite_width,y,other)
  {global.stop=1;global.go=0;}
  } 

In Topic: Requesting Icon

17 March 2009 - 08:57 PM

here are my 2 attempts, similar though:

links are .ico files

Posted Image
Link:http://www.mediafire.com/?mnjynl1kzmq

Posted Image
Link:http://www.mediafire.com/?vjomlogii2y