He won't unfreeze!
This is a script for DinkDude95 in AOTES. Why won't Dink unfreeze when he selects "Leave"?
if(&result == 11)
{
unfreeze(1);
}
}
}
}
}
Do I have to many end brackets?
if(&result == 11)
{
unfreeze(1);
}
}
}
}
}
Do I have to many end brackets?
The brackets after have nothing to do with what's inside that if statement. My guess is that something is causing that if statement not to be valid. You'd have to post the whole script in order for someone to help you find out why.
Just something to consider.. Choice statements generally work like this. Notice that "leave" doesn't have it's own if statement because at the end of it all you almost always want to unfreeze.
void talk ()
{
freeze(1);
choice_start();
"choice1"
"choice2"
"Leave"
choice_end();
if (&result == 1)
{
//do first thing
}
if (&result == 2)
{
//do second thing
}
unfreeze(1);
}
Just something to consider.. Choice statements generally work like this. Notice that "leave" doesn't have it's own if statement because at the end of it all you almost always want to unfreeze.
void talk ()
{
freeze(1);
choice_start();
"choice1"
"choice2"
"Leave"
choice_end();
if (&result == 1)
{
//do first thing
}
if (&result == 2)
{
//do second thing
}
unfreeze(1);
}
=( No, the space didn't fix it.
Alright, heres all the script.
void talk(void)
{
if(&story == 2)
{
freeze(1);
say_stop("`4Dink! You made it!",¤t_sprite);
wait(200);
startloop:
choice_start();
{
"Long Sword - 100g"
"Claw Sword - 500g"
"Light Sword - 1500g"
"Fireball - 250g"
"Super Fireball - 300"
"Stat Boost (raises all stats by 1) - 500g"
"Super Stat Boost (raises all stats by 5) - 1000g"
"Bomb - 50g"
"Herb Boots - 500g"
"Fire Bow - 5000g"
"Leave"
choice_end();
}
}
}
if(&result == 1)
{
if(&gold < 100)
{
say_stop("`4You need more money.",¤t_sprite);
goto startloop;
}
&gold -= 100;
add_item("item-sw1", 438, 7);
say_stop("`4Good choice.",¤t_sprite);
unfreeze(1);
return;
}
}
}
if(&result == 2)
{
if(&gold < 500)
{
say_stop("`4Need more money to buy that.",¤t_sprite);'
goto startloop;
}
&gold -= 500;
add_item("item-sw2", 438, 20);
unfreeze(1);
return;
}
}
if(&result == 3)
{
if(&gold < 1500)
{
say_stop("`4You don't have enough money.",¤t_sprite);
goto startloop;
}
&gold -= 1500;
add_item("item-sw3", 438, 21);
say_stop("`4Keep going! I encourage you to buy something more expensive.",¤t_sprite);
unfreeze(1);
return;
}
}
if(&result == 4)
{
if(&gold < 250)
{
say_stop("`4Not enough money.",¤t_sprite);
goto startloop;
}
&gold -= 250;
add_magic("item-fb", 437, 1);
say_stop("`4That's it! Buy some more!",¤t_sprite);
unfreeze(1);
return;
}
}
if(&result == 5)
{
if(&gold < 300)
{
say_stop("I don't have enough money!",1);
goto startloop;
}
&gold -= 300;
add_magic("item-sfb", 437, 2);
say("Yahoo! Super Fireball!",1);
unfreeze(1);
return;
}
}
if(&result == 6)
{
if(&gold < 500)
{
say_stop("`4No stat boost for you!",¤t_sprite);
goto startloop;
}
&gold -= 500;
&defense += 1;
&strength += 1;
&magic += 1;
say("I feel strong!",1);
unfreeze(1);
return;
}
}
if(&result == 7)
{
if(&gold < 1000)
{
say_stop("<sniff> Not enough money!",1);
goto startloop;
}
&gold -= 1000;
&defense += 5;
&strength += 5;
&magic += 5;
say_stop("It's Super Dink!",1);
unfreeze(1);
return;
}
}
if(&result == 8)
{
if(&gold < 50)
{
say_stop("I'm to low on cash!",1);
goto startloop;
}
&gold -= 50;
add_item("item-bom", 438, 3);
say_stop("Yeah!",1);
unfreeze(1);
return;
}
}
if(&result == 9)
{
if(&gold < 500)
{
say_stop("No Herb Boots! <sob>",1);
goto startloop;
}
&gold -= 500;
add_item("item-bt", 438, 22);
say_stop("SPEED!",1);
unfreeze(1);
return;
}
}
}
if(&result == 10)
{
if(&gold < 5000)
{
say_stop("Well, it's 20,000 bucks less than in the main game. I don't have a lot of money.",1);
goto startloop;
}
&gold -= 5000;
add_item("item-b3", 438, 13);
say_stop("FIREBOW!",1);
unfreeze(1);
return;
}
}
if (&result == 11)
{
say_stop("`4See ya, Dink!",¤t_sprite);
unfreeze(1);
}
}
Alright, heres all the script.
void talk(void)
{
if(&story == 2)
{
freeze(1);
say_stop("`4Dink! You made it!",¤t_sprite);
wait(200);
startloop:
choice_start();
{
"Long Sword - 100g"
"Claw Sword - 500g"
"Light Sword - 1500g"
"Fireball - 250g"
"Super Fireball - 300"
"Stat Boost (raises all stats by 1) - 500g"
"Super Stat Boost (raises all stats by 5) - 1000g"
"Bomb - 50g"
"Herb Boots - 500g"
"Fire Bow - 5000g"
"Leave"
choice_end();
}
}
}
if(&result == 1)
{
if(&gold < 100)
{
say_stop("`4You need more money.",¤t_sprite);
goto startloop;
}
&gold -= 100;
add_item("item-sw1", 438, 7);
say_stop("`4Good choice.",¤t_sprite);
unfreeze(1);
return;
}
}
}
if(&result == 2)
{
if(&gold < 500)
{
say_stop("`4Need more money to buy that.",¤t_sprite);'
goto startloop;
}
&gold -= 500;
add_item("item-sw2", 438, 20);
unfreeze(1);
return;
}
}
if(&result == 3)
{
if(&gold < 1500)
{
say_stop("`4You don't have enough money.",¤t_sprite);
goto startloop;
}
&gold -= 1500;
add_item("item-sw3", 438, 21);
say_stop("`4Keep going! I encourage you to buy something more expensive.",¤t_sprite);
unfreeze(1);
return;
}
}
if(&result == 4)
{
if(&gold < 250)
{
say_stop("`4Not enough money.",¤t_sprite);
goto startloop;
}
&gold -= 250;
add_magic("item-fb", 437, 1);
say_stop("`4That's it! Buy some more!",¤t_sprite);
unfreeze(1);
return;
}
}
if(&result == 5)
{
if(&gold < 300)
{
say_stop("I don't have enough money!",1);
goto startloop;
}
&gold -= 300;
add_magic("item-sfb", 437, 2);
say("Yahoo! Super Fireball!",1);
unfreeze(1);
return;
}
}
if(&result == 6)
{
if(&gold < 500)
{
say_stop("`4No stat boost for you!",¤t_sprite);
goto startloop;
}
&gold -= 500;
&defense += 1;
&strength += 1;
&magic += 1;
say("I feel strong!",1);
unfreeze(1);
return;
}
}
if(&result == 7)
{
if(&gold < 1000)
{
say_stop("<sniff> Not enough money!",1);
goto startloop;
}
&gold -= 1000;
&defense += 5;
&strength += 5;
&magic += 5;
say_stop("It's Super Dink!",1);
unfreeze(1);
return;
}
}
if(&result == 8)
{
if(&gold < 50)
{
say_stop("I'm to low on cash!",1);
goto startloop;
}
&gold -= 50;
add_item("item-bom", 438, 3);
say_stop("Yeah!",1);
unfreeze(1);
return;
}
}
if(&result == 9)
{
if(&gold < 500)
{
say_stop("No Herb Boots! <sob>",1);
goto startloop;
}
&gold -= 500;
add_item("item-bt", 438, 22);
say_stop("SPEED!",1);
unfreeze(1);
return;
}
}
}
if(&result == 10)
{
if(&gold < 5000)
{
say_stop("Well, it's 20,000 bucks less than in the main game. I don't have a lot of money.",1);
goto startloop;
}
&gold -= 5000;
add_item("item-b3", 438, 13);
say_stop("FIREBOW!",1);
unfreeze(1);
return;
}
}
if (&result == 11)
{
say_stop("`4See ya, Dink!",¤t_sprite);
unfreeze(1);
}
}
Hmm... You have an extra close bracket after the choices and after each result, so I presume none of them are working.
Also, using return is unnecessary because you have nothing other than the choice results anyway. In which case, it would be simpler to do as Rabid suggested and just put unfreeze(1); once, after result 11.
There's a ' after the say_stop in result 2, but it probably isn't causing problems.
You have a { between choice_start and the choices!
Actually, there shouldn't be any close braces immediately after the choice statement. Nothing you choose will do anything. Btw I'm adding things as I see them, so sorry if I get a bit confusing
The guy won't say anything at all if &story != 2...
In result 8: I'm too low on cash.
(I know the feeling!)
Also, using return is unnecessary because you have nothing other than the choice results anyway. In which case, it would be simpler to do as Rabid suggested and just put unfreeze(1); once, after result 11.
There's a ' after the say_stop in result 2, but it probably isn't causing problems.
You have a { between choice_start and the choices!
Actually, there shouldn't be any close braces immediately after the choice statement. Nothing you choose will do anything. Btw I'm adding things as I see them, so sorry if I get a bit confusing

The guy won't say anything at all if &story != 2...
In result 8: I'm too low on cash.

Thanks!
Btw:
This dmod is kind of sort of nearly done.
Btw:
This dmod is kind of sort of nearly done.
I'm a shopkeeper? Do I have to be a shopkeeper? I can't like, give my life testimony or something?
And what's my character look like? Is he just a farmer like my old avatar, or is he an old man like my new avatar?
And what's my character look like? Is he just a farmer like my old avatar, or is he an old man like my new avatar?
OK, I'll make you an old man. It doesn't matter to me what you are. In fact, since there are some new members in the DN:
I'm working a Dmod.
If you would like to be in it, send me a private message, or e-mail. I check my e-mail more often.
I'm working a Dmod.
If you would like to be in it, send me a private message, or e-mail. I check my e-mail more often.