After performing a debug print, it turned out that part of this code simply doesn't work on its own, even though there are no errors.
The screenshot shows that function day_3rd cuts off from the moment:
if GetTownRace ('player_1') == 1 then
sleep(5);
zaclyatye_1 ()
end;
if GetTownRace ('player_2') == 1 then
sleep(5);
zaclyatye_2 ()
end;
end;That is, for some reason, this part does not work in my code. What could be the cause? And what is the sleep function used for in this script?
And yes, I did as you said, specifically:
function new_day_trigger()
Spawn_army()
day_3rd()
end
Trigger(NEW_DAY_TRIGGER, 'new_day_trigger' );This worked for me; now I just need to solve the problem with function day_3rd. Do you have any ideas?