Auto-translated
What do pl1gold and delta mean? And how can I fix the error "Invalid file, not a PKZip file" when saving scripts?
New here? I'm Roha — want a quick tour?
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 doesn't seem right in the line with 'then'.
'then' expected near ';' it says.
And it also breaks all previous scripts.
Can you tell me what's wrong?
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" );
if SetObjectiveState("vedma1", OBJECTIVE_COMPLETED) then