The Dink Network

Reply to Re: Dink Smallwood and the City of the Dead

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:
 
 
October 22nd 2007, 02:11 PM
dinkdead.gif
The "else" is stopping it. Using that where it is means that if you choose anything other than option one the script will exit before it ever gets to "if (&result == 2)".

You also missed a couple of brackets.

Try this:

void main( void )
{
freeze(1);
say_stop("`5Hello stranger!!.", &current_sprite);
wait(300);
unfreeze(1);
//close bracket
}


void talk( void )

//open bracket, also freezing dink here is probably better/easier.
{
freeze(1);

freeze(&current_sprite);
choice_start();
set_y 240
set_title_color 5
title_start();
"May I help you??"
title_end();
"Option 1"
"Option 2"
"Leave"
choice_end();

if (&result == 1)
{
// Talk
}

if (&result == 2)
{
// Very big talk
}
you don't need else, when you choose "leave" it will exit anyway.
unfreeze(1);
unfreeze(&current_sprite);
}