Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Minimi on Thu 20/11/2003 23:04:08

Title: nested functions not supported??!
Post by: Minimi on Thu 20/11/2003 23:04:08
What does that mean??  When I try to save the game, it gives an error, and says, "Nested functions not supported".

It gives an error about the global script. here is the part that gives an error.

function character2_b() {
 // script for character2: Use inventory on character
 if (character[getplayercharacter()].activeinv == 8) {
SetGlobalInt(5,GetGlobalInt(5)+1);
SetGlobalInt(4,1);
DisplayMessage(63);
LoseInventory(8)
 
}


Please help me!
Title: Re:nested functions not supported??!
Post by: scotch on Thu 20/11/2003 23:13:43
Try putting another } after the last }, that might help assuming that that really is the end of this funtion.
The error means that you're trying to create a function inside another function, usually caused by accidentally missing out a } at the end of the previous function.
Title: Re:nested functions not supported??!
Post by: Minimi on Thu 20/11/2003 23:16:28
WTF!!! I must have done something wrong because the FUC***** program crasht... and now I have to rewrite my 300 sentences long dialog!!! ARGH!!! I'm going to bed! I'm to annoyed!!!!!!!!!!!!!!!!!!11111
Title: Re:nested functions not supported??!
Post by: Scummbuddy on Fri 21/11/2003 01:19:06
well, what scotch said is right... if its still needed.