Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: ManicMatt on Thu 25/01/2007 18:05:13

Title: scripting with "else" (Solved by himself)
Post by: ManicMatt on Thu 25/01/2007 18:05:13
Spot the error! Thanks. I'm sure it's simple enough for the proper scripters out there.

Parser error at else. Why is this? It worked before I put in extra commands to occur after all values are met.

if (value==10){
  if ((GetGlobalInt(11) == 1) && (GetGlobalInt(12) == 1) && (GetGlobalInt(13) == 1)){
   character[GOD].Say("You've converted three people! Well done! Here is the crystal of heavenity.");
   player.AddInventory(inventory[21]);
   SetCharacterView(EGO, 18);
   Wait(20);
   ReleaseCharacterView(EGO);
else character[GOD].Say("Not yet, keep at it!");
}

EDIT: Oh, was I just missing a } after the last command, before else? Oh well. Sorry to bother you.
Title: Re: scripting with "else"
Post by: Akatosh on Thu 25/01/2007 18:11:18
Please swat your face because I can't do it from over here. And mark this thread as "[SOLVED]"  ;)

Well, this is what happens if you put the "else" into the "if" command block thingy.