Connection ErrorBad RequestSession 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.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
function replacecreature()
while 1 do
if GetHeroCreatures("Sarge", CREATURE_ARCHER) >= 1 and GetTownBuildingLevel("cheast_town", TOWN_BUILDING_DWELLING_2) == 2 then
RemoveHeroCreatures("Sarge", CREATURE_ARCHER, 9999);
AddHeroCreatures("Sarge", CREATURE_LONGBOWMAN, 1);
end;
sleep(4);
end;
end;
startThread(replacecreature);
Is this how it should be?
for one, I accidentally revealed the mod I'm trying to put together
You've piqued my interest...
---
However, the code I wrote has a weak point. I suspect you don't actually have 9999 archers. It will throw an error. You need to check the exact number of archers and subtract that exact number! If the goal is to have no more of them in the army. But for now, check it without subtracting the archers.