Suddenly Problems! Filters and patch 1.26

newtonrox

Member
Reaction score
2
hey guys!
after this 1.26 patch all my filter used in GroupEnum function stopped working.

Am I the only one?
Do u guys know how to solve this?

here's an example:

JASS:

function Chamber takes nothing returns boolean
 call DisplayTextToForce( GetPlayersAll(), "aaaaaaaaaaaaaa")
return false
endfunction


function Trig_Attack_Actions takes nothing returns nothing
call GroupEnumUnitsInRect(udg_ALLMAP,bj_mapInitialPlayableArea,Filter(function Chamber) )
 call DisplayTextToForce( GetPlayersAll(), "bbbbbbbbbbbbbb")

endfunction

//===========================================================================
function InitTrig_Attack takes nothing returns nothing
    set gg_trg_Attack = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Attack, Player(0), "zzz", true )
    call TriggerAddAction( gg_trg_Attack, function Trig_Attack_Actions )
endfunction



when I type "zzz" on the chat, it only shows the message "bbbbbbbbbb" and no "aaaaaaaaaaaaa" at all.

That means it's not even calling my filter.

Help anyone?
 

Romek

Super Moderator
Reaction score
964
try adding
JASS:
set udg_ALLMAP = CreateGroup()
above the GroupEnum... call.

Have you accidentally destroyed [ljass]bj_mapInitialPlayableArea[/ljass] anywhere?
 

newtonrox

Member
Reaction score
2
Now, I got it to work.

As you said, Romek, this was my problem:
JASS:
set udg_ALLMAP = CreateGroup()


but now, I have to initialize this global udg_ALLMAP in every trigger that uses it, in order to make them work.
Does this make sense?

Is this a WE new issue? or problably am I destroying this unit group somewhere in my code?

thx, Romek!
 

WolfieeifloW

WEHZ Helper
Reaction score
372
If you're using the units in the group immediately, you can just use one, global group.
JASS:
group GROUP = CreateGroup()

In a global somewhere, then you can use that anywhere in your map for groups that are instantaneous.
 

Bribe

vJass errors are legion
Reaction score
67
I would think it's because vJass globals are initialized before GUI globals, but this doesn't appear to be the case.

You can set udg_ALLMAP to CreateGroup from within the InitTrig function to fix the problem right away,
but there may be a problem with your editor if it's not initializing itself... (unless you are destroying it
somewhere from another trigger)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top