Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Cordate on Sat 15/10/2022 21:16:46

Title: Parse error for if statement
Post by: Cordate on Sat 15/10/2022 21:16:46
When I try testing the game, I get a parse error message in the debug window for the if statement line, but I'm not sure what's wrong with it. I've used similar if statements in other parts of the game so idk what the issue is here:


function MITEDC2_OnClick(GUIControl *control, MouseButton button)
{
  MITEDChoice.Visible = false;
  MITEDialog.Visible = false;
  if ( MITEDC2.Graphic = 569 )
  {
    MITEDialog2.Visible = true;
  }
  if ( MITEDC2.Graphic = 436 )
  {
    MITEDialog2.Visible = true;
    MITECD1.NormalGraphic = 438;
    MITECD1.PushedGraphic = 438;
    MITECD1.MouseOverGraphic = 438;
  }
}
Title: Re: Parse error for if statement
Post by: Khris on Sat 15/10/2022 21:18:24
Comparisons are done using ==
Title: Re: Parse error for if statement
Post by: Cordate on Sat 15/10/2022 22:24:14
Ah, thank you!