Help with a Script
Hello. After fiddling with this for a while, I have gotten all of the script to work except for the seat choosing problem. Please take a look and see if you can find what's wrong.
void friday()
{
int &bowl = get_sprite_with_this_brain(bowl);
int &cereal = get_sprite_with_this_brain(cereal);
if(&bowl == 1)
{
if(&cereal == 1)
{
goto seat;
}
}
if(&cereal == 1)
{
if(bowl == 1)
{
goto seat;
}
}
seat:
choice_start();
set_y 240
set_title_color 3
title_start();
"Which seat should I take?"
title_end();
"Kick it in the Front Seat"
"Kick it in the Back Seat"
choice_end();
if(&result == 1)
{
&seat = 1;
goto partyin;
}
if(&result == 2)
{
&seat = 2;
goto partyin;
}
partyin:
if(&partyin < 2)
{
&partyin += 1;
goto partyin;
}
else
{
goto yeah;
}
yeah:
say_stop("Yeah!",1);
goto partyin;
}
What exactly doesn't work? Looking at the script in morning dizzyness, I can't spot any mistake. Not gonna guarantee, but sometimes when making choices, I just screw around with the amount of the curly brackets and it starts working.
I'm totally confused as to what this script actually does...
First of all get_sprite_with_this_brain() takes two integers as parameters, so having the text 'bowl' or 'cereal' there should always return 0.
Secondly you compare the sprite numbers to 1 next, this would imply that the sprite is Dink. That can be known in advance since Dink is the only one with a brain 1. Also the check is a bit superfluous as the only thing it does is a goto command to a place it would goto anyway. As it is you could just as well remove this entire part as it does absolutely nothing, even when the get_sprite_with_this_brain() part is fixed:
In the same way you can remove the goto commands to partyin in this part:
Also, I don't see you having declared &seat anywhere. I assume this is a global then?
First of all get_sprite_with_this_brain() takes two integers as parameters, so having the text 'bowl' or 'cereal' there should always return 0.
Secondly you compare the sprite numbers to 1 next, this would imply that the sprite is Dink. That can be known in advance since Dink is the only one with a brain 1. Also the check is a bit superfluous as the only thing it does is a goto command to a place it would goto anyway. As it is you could just as well remove this entire part as it does absolutely nothing, even when the get_sprite_with_this_brain() part is fixed:
if(&bowl == 1)
{
if(&cereal == 1)
{
goto seat;
}
}
if(&cereal == 1)
{
if(bowl == 1)
{
goto seat;
}
}In the same way you can remove the goto commands to partyin in this part:
if(&result == 1)
{
&seat = 1;
goto partyin;
}
if(&result == 2)
{
&seat = 2;
goto partyin;
}Also, I don't see you having declared &seat anywhere. I assume this is a global then?
I based it off of the song Friday
I got bored and made a fake script. I would never knowingly let Rebecca Black in my D-Mod.













