Parse error. Don't know whats wrong?

Started by Mixand, Thu 20/05/2010 10:47:21

Previous topic - Next topic

Mixand

I'm really embarrassed >.>
sorry


function hSandy_Interact()
{
if (cJason.ActiveInventory==iKnife);
{
 cJason.Walk(166, 126, eBlock, eWalkableAreas);
 Display("You cut the gum of sandy's hair.");
 cJason.AddInventory(iGum);
}
else
{
 cJason.Walk(188, 115, eBlock, eWalkableAreas);
 cJason.Think("Moving her would hurt and you can't take the gum off with your hands.");

}
}

But I get this error:

Failed to save room room4.crm; details below
room4.asc(59): Error (line 59): PE04: parse error at ';'

Thankyou for any help.


Sslaxx

Quote from: Mixand on Thu 20/05/2010 10:47:21
function hSandy_Interact()
{
if (cJason.ActiveInventory==iKnife);
{
  cJason.Walk(166, 126, eBlock, eWalkableAreas);
  Display("You cut the gum of sandy's hair.");
  cJason.AddInventory(iGum);
}
else
{
  cJason.Walk(188, 115, eBlock, eWalkableAreas);
  cJason.Think("Moving her would hurt and you can't take the gum off with your hands.");

}
}

But I get this error:

Failed to save room room4.crm; details below
room4.asc(59): Error (line 59): PE04: parse error at ';'

Thankyou for any help.
if (cJason.ActiveInventory==iKnife);
I think that semicolon at the end of the if statement is a start.
Stuart "Sslaxx" Moore.

Dualnames

In case it's not obvious on Sslaxx's answer (which I doubt), but just in case.

Code: ags


function hSandy_Interact(){
if (cJason.ActiveInventory==iKnife) {
  cJason.Walk(166, 126, eBlock, eWalkableAreas);
  Display("You cut the gum of sandy's hair.");
  cJason.AddInventory(iGum);
}
else{
  cJason.Walk(188, 115, eBlock, eWalkableAreas);
  cJason.Think("Moving her would hurt and you can't take the gum off with your hands.");
}
}

Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk