Game crash
Why does this game crash after Dink says "I'll try"?
Just can't find out what's wrong...
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(); }
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.
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:
Is there any way to solve this?
I can't make a game without statusbar D:
Try switching &update_status = 1; and draw_status(); around.
I tried that before (and I did again now) it doesn't work.
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.
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).
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.
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.
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.
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.
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:
I'll just have to give this up D:
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.
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.