[Trigger] error when testing/loading map

Status
Not open for further replies.
Level 4
Joined
Oct 15, 2008
Messages
77
i have no idea why im getting this error....the error messege im receiving is

if ( not ( UnitTypeIsInRegion(gg_rct_start_loc, 'hbla') == false ) ) then


my trigger looks like this
  • Player Group - Pick every player in Force1 and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Does start_loc <gen> contain a unit of Type random_race[1]) Equal to False
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Does start_loc <gen> contain a unit of Type Blacksmith) Equal to False
            • Then - Actions
              • Unit - Create 1 Blacksmith for (Triggering player) at (starting_location[(Player number of (Triggering player))] offset by (800.00, 150.00)) facing Default building facing (270.0) degrees
            • Else - Actions
              • Do nothing
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Does start_loc <gen> contain a unit of Type random_race[2]) Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Does start_loc <gen> contain a unit of Type Blacksmith) Equal to False
                • Then - Actions
                  • Unit - Create 1 Blacksmith for (Triggering player) at (starting_location[(Player number of (Triggering player))] offset by (800.00, 150.00)) facing Default building facing (270.0) degrees
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Does start_loc <gen> contain a unit of Type random_race[3]) Equal to False
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Does start_loc <gen> contain a unit of Type Blacksmith) Equal to False
                    • Then - Actions
                      • Unit - Create 1 Blacksmith for (Triggering player) at (starting_location[(Player number of (Triggering player))] offset by (800.00, 150.00)) facing Default building facing (270.0) degrees
                    • Else - Actions
                      • Do nothing
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Does start_loc <gen> contain a unit of Type random_race[4]) Equal to False
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Does start_loc <gen> contain a unit of Type Blacksmith) Equal to False
                        • Then - Actions
                          • Unit - Create 1 Blacksmith for (Triggering player) at (starting_location[(Player number of (Triggering player))] offset by (800.00, 150.00)) facing Default building facing (270.0) degrees
                        • Else - Actions
                          • Do nothing
                    • Else - Actions
                      • Do nothing
 
Isn't there another message you see just above that? (Starting with Line ...: <ERROR TYPE>)

Also, I suggest you remove all 'Do Nothing' commands from the Else - Actions. There's no need for them, and they seem to still need to be performed as an actions (so I've heared), so it's only annoying to add them if not necessary.
 
the error when i got that was "name expected" or w/e, and thanks for the heads up on removing do nothings, and what do you mean by nest my if/then/else's?
 
if ( not ( UnitTypeIsInRegion(gg_rct_start_loc, 'hbla') == false ) ) then

what type of array is random_race[x] and are u sure that 1-4 have values? i think it's crashing because random_race[x] is set to null or not set yet.
 
Last edited:
random race[x] is a unit-type array thats the main Hall. they have their values set in the map intialization trigger
 
Status
Not open for further replies.
Back
Top