@JORAJAN if ur asking about MapScript.lua in ur map - u just cant use GetObjectArmySlotCreature function in v3.0. So that's solution without this function:
garrison_names={'G0', 'G1', 'G2', 'G3', 'G4', 'G5', 'G6', 'G7', 'G8', 'G9'}
garrisons={}
function pack(...)
return arg
end
for j, gar in garrison_names do
Trigger(5, gar, 'capture_gar')
garrisons[gar] = {}
local gar_creatures = pack(GetObjectCreaturesTypes(gar))
for i, creature in gar_creatures do
if creature ~= 0 then
garrisons[gar][creature] = GetObjectCreatures(gar, creature)
end
end
end
function capture_gar(oldowner, newowner, hero, gar)
for creature, count in garrisons[gar] do
if not (creature == 0 or count == 0) then
garrisons[gar][creature] = count * 2
AddObjectCreatures(gar, creature, count * 2)
end
end
DenyGarrisonCreaturesTakeAway(gar, 1)
end