Try indenting your code! See the problem? I do!
void bag1()
{
if (!flags[FLAG_BAGS])
{
TextBox("bag 1 of 2 recieved");
flags[FLAG_BAGS] = 2;
}
else
{
TextBox("bag 2 of 2 recieved");
flags[FLAG_FAIRY] = 2;
}
void bag1()
{
if (!flags[FLAG_BAGS])
{
TextBox("bag 1 of 2 recieved");
flags[FLAG_BAGS] = 2;
}
else
{
TextBox("bag 2 of 2 recieved");
flags[FLAG_FAIRY] = 2;
}
Keep in mind that the spacing is for the coder's benefit. Verge just jumps over the spaces without caring. You should put indentation (tabs) in so you can spot the error! This way you find it before the compiler goes "huh whatchu doin' silly kid I'm confused".
Since you're missing a bracket, it thinks you're trying to make a function inside a function (which isn't possible in VergeC). Yeah, so add the missing }'s.
Oh, also, your functions have identical names (bag1), this'll cause errors too!