Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
The problem is as follows: I want the "uderzhatG" quest to activate after capturing the "gorodSvyat" town. Also, if this town belongs to Player 2, then the quest should fail, and the player should lose the mission. Additionally, the quest should be completed after the "Nemor" hero is defeated. However, after I add the functions below to my code, everything breaks, and the quest doesn't trigger (although the initial settings are applied). What's the problem?
```
function uderzhat ()
SetObjectiveState("uderzhatG", OBJECTIVE_ACTIVE);
Trigger(OBJECT_CAPTURE_TRIGGER, "gorodSvyat", nil );
end;
Trigger(OBJECT_CAPTURE_TRIGGER, "gorodSvyat", "uderzhat" );
function CheckSvyat ()
while (1) do
sleep(2);
if GetObjectOwner("gorodSvyat")==PLAYER_2 then
sleep (2)
SetObjectiveState("uderzhatG", OBJECTIVE_FAILED);
sleep (15)
Loose ();
break
end;
end;
end;
startThread (CheckSvyat)
function UderzhatComplete ()
SetObjectiveState("uderzhatG", OBJECTIVE_COMPLETED);
Trigger (PLAYER_REMOVE_HERO_TRIGGER, "Nemor", nil)
end
Trigger (PLAYER_REMOVE_HERO_TRIGGER, "Nemor", "UderzhatComplete")