Try this:
Without JASS Tags (The One you copy)
function GetCreepsOnMapBoolean takes nothing returns boolean
return IsUnitOwnedByPlayer(GetFilterUnit(),Player(PLAYER_NEUTRAL_AGGRESSIVE))
endfunction
function GetCreepsOnMap takes group a returns group
local group g=CreateGroup()
local boolexpr b=Condition(function GetCreepsOnMapBoolean)
call GroupEnumUnitsInRect(g,GetPlayableMapRect(),b)
set g=a
call DestroyGroup(g)
set g=null
return a
endfunction
function Trig_Creeps_all_dead_Actions takes nothing returns nothing
local group b=CreateGroup()
set b=GetCreepsOnMap(b)
if CountUnitsInGroup(b)<=0 then
call DisplayTextToForce( GetPlayersAll(), "All Creeps Dead" )
endif
call DestroyGroup(b)
set b=null
endfunction
//===========================================================================
function InitTrig_Creeps_all_dead takes nothing returns nothing
set gg_trg_Creeps_all_dead = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Creeps_all_dead, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Creeps_all_dead, function Trig_Creeps_all_dead_Actions )
endfunction
With Jass Tags (Just to see)
JASS:
function GetCreepsOnMapBoolean takes nothing returns boolean
return IsUnitOwnedByPlayer(GetFilterUnit(),Player(PLAYER_NEUTRAL_AGGRESSIVE))
endfunction
function GetCreepsOnMap takes group a returns group
local group g=CreateGroup()
local boolexpr b=Condition(function GetCreepsOnMapBoolean)
call GroupEnumUnitsInRect(g,GetPlayableMapRect(),b)
set g=a
call DestroyGroup(g)
set g=null
return a
endfunction
function Trig_Creeps_all_dead_Actions takes nothing returns nothing
local group b=CreateGroup()
set b=GetCreepsOnMap(b)
if CountUnitsInGroup(b)<=0 then
call DisplayTextToForce( GetPlayersAll(), "All Creeps Dead" )
endif
call DestroyGroup(b)
set b=null
endfunction
//===========================================================================
function InitTrig_Creeps_all_dead takes nothing returns nothing
set gg_trg_Creeps_all_dead = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Creeps_all_dead, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Creeps_all_dead, function Trig_Creeps_all_dead_Actions )
endfunction