Auto-translated
startThread simply launches a function. It's like a trigger, but it doesn't depend on anything. Moreover, if you put a while loop, the function will be checked endlessly immediately after launch. I think the problem might be with
sleep, as the script might simply not have enough time to execute))
Added 1 minute ago
Although, actually, no, that's not the problem. There are plenty of sleeps there... There's also a pop-up message...
Added 2 minutes ago
Damn, I changed the variable name, and it all started working. What a load of nonsense...There's still a second question...
Added 22 minutes ago
I'm completely confused..
SetTownBuildingLimitLevel('elftown', TB_TAVERN, 0)
SetObjectDwellingCreatures('elftown' , 2, 100)
In the first case, it doesn't understand the building type, and I can't find another one. It also doesn't work with quotes.
In the second case, it doesn't want to add creatures for recruitment. Although all the creature dwellings are built.
It's terrible