The Dink Network

Reply to Re: New File: Dink Smallwood v1.08 - Release Candidate 5

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
January 28th 2006, 07:13 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
The test script is similar to en-pill.c from the original Dink game, with only the hit() proc and a few stats (hitpoints, touch_damage, would size matter?) modified.

void hit( void )
{
hurt(&current_sprite, 2);
}

Crashes the game. Fix it. Now. Or later, when you have time.

Miraculously, this:

void hit( void )
{
hurt(1, 2);
}

works just fine. The thing is in the &current_sprite. AFAIK, hurt() doesn't call the hit-proc, so there's no infinite loop. I checked it by making a new global with the console, creating a new sprite with that global, adding the script and hurting it, but no hit() was ever executed.

Alternatives that also crash, with a few attempted work-arounds/fixes:

void hit( void )
{
//I tried this one, didn't work:
wait(1);

//Neither of these also work:
say("Hehehe",1);
say_stop("Hehehe",1);

//Neat brain-switching technique, to no avail
sp_brain(&current_sprite, 0);
//goto-ing... crash
goto blah;
//proc() call... crash
hehehe();
//remote proc() call...
crash external("blah","hehehe",&current_sprite);
//spawning... crash
&global = &current_sprite;
spawn("nooo");

//I haven't tried an &arg1-less external(), with the global
//but I guess it would crash as well...

sp_brain(&current_sprite, 9);
}

void hehehe( void )
{
blah:
hurt(&current_sprite, 2);
}

blah.c:

void hehehe( void )
{
hurt(&arg1, 2);
}

nooo.c:

void main( void )
{
hurt(&global, 2);
kill_this_task();
}

The brain switching doesn't prevent it from crashing, nor does the wait. The say text won't appear, but the say_stop text does. After that, it crashes in a different fashion.

Tried in windowed/truecolor and fullscreen/256.

say_stop (in windowed) crashes the game, without giving an error box, all other methods crash the game with an error box (default one with an illegal operation and a bunch of hex-numbers).This is on win98 SE.

After I was tired of freezing the game and resetting my pc in 256-fullscreen mode, I resorted to full color-windowed mode. I have only tried say, wait and the brain-switching in 256-fullscreen.