The Dink Network

Yet another trivial problem... your going to have to start getting used to this... sory

April 16th 2005, 01:19 PM
pig.gif
Right, ive got a malfuctioning script, it quits to windows near the start. thanks for help.

void main(void)
{
freeze(1);
wait(400);
move_stop(1, 8, 230, 1);
stop_stop("-----------", 1);
move_stop(1, 8, 230, 1);
//crashes right here
wait(200);
say_stop("-----------------------------------------", 1);
move_stop(1, 8, 30, 0);
say_stop("---------------------------------------------------------------------------------------------------------", 1);
move_stop(1, 6, 400, 1);
say_stop("---------------------------------------------------------------------------", 1);
wait(100);
say_stop("--------------------------------------------------------", 1);
move_stop(1, 6, 520, 1);
say("---------------------", 1);
wait(100);
sp dir(1, 8);
wait(800);
sp dir(1, 6);
wait(400);
move_stop(1, 2, 250, 1);
wait(400);
playmidi("1.mid")
int &knight = create_sprite(520, 390, 16, 397, 1);
sp_base_walk(&knight, 240);
sp_speed(&knight, 1);
say_stop("`3-------------------", &knight);

Choice_start();
"------"
"-------------"
choice_end();

If(&result==1);
{
wait(200);
say_stop("`3------------" &knight);
move_stop(&knight, 8, 180, 1);
int &knight2 = create_sprite(520, 390, 16, 397, 1);
sp_base_walk(&knight2, 240);
sp_speed(&knight2, 1);
move_stop(&knight2, 8, 320, 1);
move(&knight, 6, 680, 1);
move(&knight2, 6, 680, 1);
move(&1, 6, 680, 1);
say("`7-----------------", &knight2);
wait(2000);
unfreeze(1);
}
}

Thanks again guys, and sorry if its a realy odvious problem, i'm so rusty i had to look up the move_stop procedure...

Thanks.
April 16th 2005, 01:24 PM
wizardg.gif
Chaotic
Peasant He/Him
 
Your telling Dink (1) to move to the exact same spot where he was.

wait(400);
move_stop(1, 8, 230, 1); <---same movement
stop_stop("-----------", 1);
move_stop(1, 8, 230, 1); <---same movement
//crashes right here
wait(200);
April 16th 2005, 01:26 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
void main(void)
{
freeze(1);
wait(400);
move_stop(1, 8, 230, 1);
stop_stop("-----------", 1);
move_stop(1, 8, 230, 1);
//crashes right here

Well, Dink walks up to y-coordinate 230. Then he says something. Then he tries to walk up again to a coordinate he's already standing at... so there's no point in doing move_stop because the game then waits for Dink to arrive at a coordinate he's already standing at. What is it exactly that you're trying to achieve with that second move_stop command? If you want to make him walk elsewhere, you'll need to change 8 and 230. Or use sp_dir(1, x); to make him look to 2, 4, 6 or 8.

Edit: bleh, my answer is longer
April 16th 2005, 01:27 PM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
That doesn't crash the game, Chaotic.

I think thew problem is more likely the first "say_stop" command... which in fact says "stop_stop".
April 16th 2005, 01:29 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Yeah, but the engine ignores commands it can't read. If you add a command with an incorrect syntax, it gets ignored and the script will run anyway.
April 16th 2005, 01:42 PM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
But... what else could crash the game? I'm sure the moving command doesn't. But it must do. Unless it only happens if the direction is the same twice in a row.

I know this...

move_stop(1, 2, 300, 1);
move_stop(1, 8, 300, 1);

... won't crash it.

My head hurts.
April 16th 2005, 03:25 PM
pig.gif
I found the problem!

it was because the dink engine cant support to many characters in one speech command.

say_stop("---------------------------------------------------------------------------------------------------------", 1); was the proplem.

P.S. thanks for noticing about the stop_ stop, i was wondering why it didnt say that.
April 16th 2005, 03:37 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
In that case, it should still say the say_stop line in front of that but ah well, it's fixed now anyway