The Dink Network

Game crash

October 9th 2009, 09:41 AM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
Why does this game crash after Dink says "I'll try"?
Just can't find out what's wrong...

void main(void)
{
	wait(1);
	freeze(1);
	dink_can_walk_off_screen(1);	
	int &girl;
	sp_dir(1, 6);
	wait(500);
	say_stop("What a lovely morning!", 1);
	say_stop("Hmm, what to do...", 1);
	say_stop("I'll think I'll go for a walk!", 1);
	wait(800);
	move_stop(1, 6, 523, 1);
	
	fade_down();
	script_attach(1000);
	&player_map = 015;
	load_screen();
	draw_screen();
	freeze(1);
	sp_x(1, 147);
	sp_y(1, 270);
	sp_dir(1, 6);
	&girl = create_sprite(147, 480, 0, 221, 1);
	sp_base_walk(&girl, 220);
	sp_dir(&girl, 7);
	sp_speed(&girl, 3);
	fade_up();
	
	
	wait(500);
	say_stop("`1Dink! Dink!", &girl);
	say_stop("Huh?", 1);
	sp_dir(1, 2);
	wait(200);
	move_stop(&girl, 8, 320, 1);
	say_stop("`1Dink! Thank god you are awake!", &girl);
	say_stop("`1You have to save us!", &girl); 
	say_stop("What's wrong?", 1);
	wait(200);
	say_stop("`1Can't explain now, just follow me!", &girl);
	sp_dir(&girl, 3);
	sp_dir( 1, 2);
	move_stop(&girl, 2, 500, 1);
	
	fade_down();
	script_attach(1000);
	&player_map = 047;
	load_screen();
	draw_screen();
	wait(1);
	freeze(1);
	sp_x(1, 147);
	sp_y(1, 69);
	sp_dir(1, 2);
	&girl = create_sprite(226, 200, 0, 221, 1);
	sp_base_walk(&girl, 220);
	sp_dir(&girl, 7);
	sp_speed(&girl, 3);
	fade_up();
	
	say_stop("`1Hurry up dink!", &girl);
	wait(500);
	sp_dir(&girl, 3);
	wait(200);
	move_stop(&girl, 2, 500, 1);
	move_stop(1, 2, 153, 1);
	wait(200);
	sp_dir(1, 6);
	wait(200);
	move_stop(1, 6, 220, 1);
	wait(200);
	sp_dir(1, 2);
	move_stop(1, 2, 500, 1);
	
	fade_down();
	script_attach(1000);
	&player_map = 079;
	load_screen();
	draw_screen();
	wait(1);
	freeze(1);
	sp_x(1, 220);
	sp_y(1, 69);
	sp_dir(1, 2);
	fade_up();
	
	wait(200);
	say_stop("`2Dink!", &m1);
	move_stop(1, 2, 251, 1);
	sp_dir(1, 6);
	say_stop("`8TIME TO KILL!!", &m2);
	wait(200);
	say_stop("`3Forgive him, he is a bit overenthusiastic...", &m3);
	wait(200);
	say_stop("What exactly is going on?", 1);
	wait(200);
	say_stop("`8A WAAAAAAAAAAR!", &m3);
	wait(500);
	say_stop("`1Dink... The goblins will attack us any minute now!", &g);
	wait(200);
	say_stop("Oh really? Where are your so called goblins then?", 1);
	wait(200);
	say_stop("`2East of here...", &m1);
	wait(100);
	say_stop("Yea, sure, I'll check it out", 1);
	move_stop(1, 6, 620, 1);
	
	
	fade_down();
	script_attach(1000);
	&player_map = 080;
	load_screen();
	draw_screen();
	wait(1);
	freeze(1);
	sp_x(1, 34);
	sp_y(1, 251);
	sp_dir(1, 6);
	fade_up();
	
	wait(1000);
	say_stop("Oh my...", 1);
	say_stop("`4What are you looking at, human?", &go1);
	say_stop("`5We will kill you all soon enough so just wait will ya'?", &go2);
	wait(2000);
	sp_dir(1, 4);
	wait(300);
	move_stop(1, 4, 0, 1);
	
	fade_down();
	script_attach(1000);
	&player_map = 079;
	load_screen();
	draw_screen();
	wait(1);
	freeze(1);
	sp_x(1, 604);
	sp_y(1, 251);
	sp_dir(1, 4);
	fade_up();
	
	wait(200);
	say_stop("We can't fight them!!", 1);
	say("`8WHY NOT!?", &m2);
	say("`2What?", &m1);
	say("`3Excuse me?", &m3);
	wait(2000);
	say_stop("`1But Dink, you are a Hero! With your help we can fight them!", &g);
	say_stop("Hey I'm not a hero! I WAS I hero but I'm not anymore!", 1);
	say_stop("I sold my sword to buy this house,", 1);
	say_stop("I haven't done any heroic deeds in ages,", 1);
	say_stop("and I somehow lost all my levels!", 1);
	wait(3000);
	say_stop("`8PANIC!", &m2);
	wait(500);
	say_stop("`8PANIC!", &m2);
	wait(500);
	say_stop("`8PANIC!", &m2);
	wait(500);
	say_stop("Calm down, I've got a plan!", 1);
	wait(200);
	say_stop("`8PANIC!", &m2);
	say_stop("*Cough*", 1);
	say_stop("Anyway, we just have to sneak out of the town and then run for our lifes!", 1);
	wait(2000);
	say_stop("`1Dink...", &g);
	wait(500);
	say_stop("`1They are blocking the only exit...", &g);
	wait(2000);
	say_stop("PANIC!", 1);
	say_stop("`3Dink, you have to find another way out of the town!", &m3);
	say_stop("I'll try...", 1);
	&story = 1;
	dink_can_walk_off_screen(0);
	draw_status();
	&update_status = 1;           
	unfreeze(1);            
	kill_this_task();
}
October 9th 2009, 10:59 AM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Hmmm.. try commenting out the draw status. I seem to remember having some weird problems with that crashing a game before. Not a crash caused by your coding I don't think.
October 9th 2009, 01:04 PM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
It's work if I comment out draw status...

Is there any way to solve this?
I can't make a game without statusbar D:

October 9th 2009, 04:17 PM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
Try switching &update_status = 1; and draw_status(); around.
October 9th 2009, 04:33 PM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
I tried that before (and I did again now) it doesn't work.
October 9th 2009, 09:32 PM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
Try messing with the orders a bit more, for example, drawing the status after unfreezing the game. Or put a tiny delay inbetween the events and the status updating/unfreezing.
October 10th 2009, 02:36 AM
spike.gif
The problem is with the status bar, not the script. Crashing the game by doing something to the status bar is very easy. If you have new graphics for it, for example, and they are NOT exactly the same size as the original status bar, the game will crash (you can change the size of some of the status bar graphics, like the numbers, but the sidebars, downbar and such have to be the exact same size).
October 10th 2009, 08:16 AM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I went back to he instance that did this to me..

It turns out for my case, I had loaded the items sequence (438) twice and this made it crash when the status bar was drawn. If those don't work, you could try looking in the ini for something like that.
October 10th 2009, 12:48 PM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
I desided to draw the statusbar and update status before the intro was spawn, as nothing workt so far of all the possible sulotions. But when I did so the game crashed as soon as i clicked start.

This is just weird D:

Please tell me if you find another way to solve it, I'll be messing around in the script to find away to solve it.
October 11th 2009, 06:04 AM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
Today I tried spawning another script with draw_status and update status in, still doesn't work

I'll just have to give this up D:
October 11th 2009, 08:32 AM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
If you're still using the original status bar and know that's not the problem, try making a backup of your dink.ini and replacing it with the dink.ini from the original game. If that works, you know there's a problem somewhere within your dink.ini file.

If you are using a new status bar, try reverting back to the original. If it works after this, you're obviously having problems with that said new status bar.

As it was said before, it's not a scripting error. The problem lies with something else.
October 11th 2009, 11:43 AM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
I made a new game and took the scipts and map, (same result as what you suggested, rabitwolf9, but i hadn't read your post) and now it's working!

Thanks to all of you.