What's wrong with this line?

trees123

New Member
Reaction score
6
Trigger:
  • Set Ward1[((Number of units in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Sentry Ward) and (((Owner of (Triggering unit)) is in Team1) Equal to True)))) + 1)] = (Triggering unit)


Whenever I try saving the map, there's an error that says "Expected a function name." This is the line in jass

JASS:
set udg_Ward1[( CountUnitsInGroup(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Wards2_Func001Func003001001001002))) + 1 )] = GetTriggerUnit()
 

Happy

Well-Known Member
Reaction score
71
whats the "= triggering unit" at the end for?? oO

and why you dont build it this way :
set ward1 = number of living sentry ward units owned by player X + 1

and then :
set ward1 = triggering unit

besides there's no sense for me but its your map^^
 

trees123

New Member
Reaction score
6
Well the variable would have to be set to something, right? :S If there wasn't, there wouldn't be any point in using that action at all. Anyway, I'm pretty sure you've got the wrong idea. Setting the variable twice wouldn't do anything. Also, the variable "Ward1" is a unit array. Thanks for your input though.
 

trees123

New Member
Reaction score
6
I guess the problem is using the "Units in region matching" action. Now I just need to know how I'm supposed to set the index of the array for this variable. =/
 

trees123

New Member
Reaction score
6
What do you mean break it up? I'm too inexperienced and fragile to do it.
Also, I thought setting variables didn't leak.
 
Reaction score
54
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Owner of Triggering Unit) is in Team1
    • Then - Actions
      • Set Temp_Group = Units in (Playable Map Area) matching (Unit-type of (Matching Unit) equals Sentry Ward
      • Set Wards[Number of Units in Temp_Group + 1] = Triggering Unit
      • Custom script: call DestroyGroup(udg_Temp_Group)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top