📧 Message Board Archive

error
When I press this key (key-90 = Z) my comp crashes what's wrong with it?



SCRIPT KEY-90.C

void main(void)

{

if (&escape == 0)

{

say("I haven't got Escape Magic", 1);

}

if (&escape == 1)

{

&magic_level = 0;

say("Give me the power of *SAFETY*", 1);

wait(800);

script_attach(1000);

fade_down();

fill_screen(0);

&player_map = 500;

sp_x(1, 320);

sp_y(1, 220);

load_screen();

draw_screen();

fade_up();

&update_status = 1;

draw_status();

return;



kill_this_task();

}









Re: error
: When I press this key (key-90 = Z) my comp crashes what's wrong with it?



: SCRIPT KEY-90.C



: void main(void)



: {



: if (&escape == 0)



: {



:  say("I haven't got Escape Magic", 1);



: }



: if (&escape == 1)



: {



: &magic_level = 0;



: say("Give me the power of *SAFETY*", 1);



: wait(800);



: script_attach(1000);



: fade_down();



: fill_screen(0);



: &player_map = 500;



: sp_x(1, 320);



: sp_y(1, 220);



: load_screen();



: draw_screen();



: fade_up();



: &update_status = 1;



: draw_status();



: return;



: kill_this_task();



: }



Add one } in the end.





Re: error
: When I press this key (key-90 = Z) my comp crashes what's wrong with it?



: SCRIPT KEY-90.C



: void main(void)



: {



: if (&escape == 0)



: {



:  say("I haven't got Escape Magic", 1);



: }



: if (&escape == 1)



: {



: &magic_level = 0;



: say("Give me the power of *SAFETY*", 1);



: wait(800);



: script_attach(1000);



: fade_down();



: fill_screen(0);



: &player_map = 500;



: sp_x(1, 320);



: sp_y(1, 220);



: load_screen();



: draw_screen();



: fade_up();



: &update_status = 1;



: draw_status();



: return;



: kill_this_task();



: }





I don't know why it crashes, but the Kill_this_task() command will not work, since you use return in front of it.