The Dink Network

Reply to Re: Story scripts suck

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 19th 2005, 12:12 AM
goblinm.gif
The link works fine for me, and Cypry's advice was on point. You need to close your braces. Think of braces like you think of parentheses. If you have a starting parenthesis, you need an ending parenthesis. Further, the way you place the braces matters to what order stuff is run in.

EDIT: A fix of your script

void main( void )
{
if (&story == 0)
{
say_stop("`1You better not edited the C files player.",&current_sprite);
}//you needed this extra brace

if (&story == 1)
{
freeze(1);
say_stop("You were calling me?", 1);
wait(500);
say_stop("`1Yes. It's dinner time.",&current_sprite);
wait(500);
say_stop("Yay! What are we having?", 1);
wait(500);
say_stop("`1Well, I wanted to have duck but we're all out.",&current_sprite);
wait(500);
say_stop("Fine. I'll get the duck.", 1);
wait(500);
say_stop("`1And I'll get the axe.",&current_sprite);
wait(500);
say_stop("Please hurry Dink, it's getting dark...", 1);
wait(500);
&story = 2;
unfreeze(1);
}//this brace was going backwards before

if (&story == 2)
{
say_stop("`1Hurry up and get the duck please Dink.",&current_sprite);
}//you needed this extra brace
//also consider using say instead of say_stop

if (&story == 3)
{
say_stop("`1JUST GET THE DUCK DINK!",&current_sprite);
}//you needed this extra brace
//again, say may be better than say_stop here
//say_stop does funny things when Dink isn't frozen

}//you needed this extra brace...
//...to close out your main procedure

void hit(void)
{
freeze(1);
say_stop("`1DON'T HIT ME!.",&current_sprite);
wait(500);
say_stop("DON'T SHOUT AT ME!", 1);
wait(500);
&story = 3;
unfreeze(1);
}