The Dink Network

Script causing crash

October 8th 2007, 03:46 PM
dinkdead.gif
What's wrong with this script? The game crashes (goes black then back to desktop with game not responding) when it is run, and I can't see why.

freeze(&current_sprite);
playsound(12, 22050, 0,0,0);
say("`9Something hit me!", &current_sprite);
wait(750);
say("`9Heeelp!", &current_sprite);
sp_speed(&current_sprite, 10);
//int &xxx = sp_x(&current_sprite, -1);
int &yyy = sp_y(&current_sprite, -1);
if (&yyy < 240)
{
move_stop(&current_sprite, 2, 240, 1);
}
move_stop(&current_sprite, 4, 60, 1);
playsound(12, 22050, 0,0,0);
move_stop(&current_sprite, 2, 333, 1);
move_stop(&current_sprite, 6, 580, 1);
move_stop(&current_sprite, 8, 240, 1);
playsound(12, 22050, 0,0,0);
move_stop(&current_sprite, 4, 60, 1);
move_stop(&current_sprite, 2, 333, 1);
move_stop(&current_sprite, 6, 580, 1);
playsound(12, 22050, 0,0,0);
move_stop(&current_sprite, 8, 240, 1);
sp_speed(&current_sprite, 5);
say("`9Puff... puff...", &current_sprite);
move_stop(&current_sprite, 4, 500, 1);
sp_speed(&current_sprite, 1);
unfreeze(&current_sprite);
October 8th 2007, 04:46 PM
dinkdead.gif
Forget it, I found the problem.
Sound 12 is faulty - enter.wav doesn't exist and sound 12 is only wscream.wav in the original game's start.c, which is where I looked.