Auto-translated
I added a space, but nothing changed; the map freezes, and it can't be loaded.
Am I writing everything correctly?
function GarrisonBlock()
while 1 do
if GetObjectOwner("Fortress_2")==GetObjectOwner("Dungeon_1") then
SetObjectEnabled("Garnizon_1", 1, GetObjectOwner("Dungeon_1"))
while not IsObjectEnabled("Garnizon_1") do sleep(1)end
end
for i=1,8 do
if GetPlayerState(i)==PLAYER_ACTIVE and i~=GetObjectOwner("Dungeon_1") and i~=GetObjectOwner("Fortress_2") and IsObjectEnabled("Garnizon_1") then
SetObjectEnabled("Garnizon_1", nil, i)
end;
end;
end;
sleep(1)
end;
startThread(GarrisonBlock)
Added 1 minute ago
I probably added commas unnecessarily, but I removed them, and nothing changed.