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.
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.
In case it's not obvious on Sslaxx's answer (which I doubt), but just in case.
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.");
}
}