Auto-translated
SetObjectEnabled("fort", false);
function fortF()
pl1gold = GetPlayerResource(PLAYER_1, GOLD);
if pl1gold >= 2999;
then SetPlayerResource(PLAYER_1, GOLD, pl1gold – 2999);
SetObjectEnabled("fort", true);
end;
end;
Trigger(OBJECT_TOUCH_TRIGGER, "fort", "fortF");
It should take money from the player and activate the Fortress, but something seems to be wrong with the line containing 'then'.
It says, 'then' expected near ';'.
Also, it breaks all previous scripts.
Can you tell me what's wrong?
Thank you.