• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Why won't this trigger work?

Status
Not open for further replies.
Level 4
Joined
May 2, 2013
Messages
107
Hi there.. See image.. Why doesnt this work.. When I test.. Only I get the 3 structures.. The other 2 players not (and yes they are set on 'user' at player properties)..
 

Attachments

  • start structure.png
    start structure.png
    67.4 KB · Views: 142
Level 4
Joined
May 2, 2013
Messages
107
It gives multiple errors:

Parameter out of bounds in sUnits create (value: -1, min 0, max 15?)

So I can assume the indexes of the Global Var can't be found or out of array.. But how can that be if the local var Integer only become number 1 to 6
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
I am guessing that the "Player 2/3 from Players on Team 1" is returning -1, an invalid player. As such you are trying to create units for player -1, which is illegal.

Basically, there is no player 2 or 3 in "Players on Team 1" player group.

You can confirm using the trigger debugger, and stepping through the initialization function while watching what values are assigned to what variables. In fact, I am quite surprised you did not use this already.
 
Level 4
Joined
May 2, 2013
Messages
107
Yes, there are some values -1 of some integers. I didn't knew about the debugger Trigger Function. Very usefull :). But still, now I know that the values are incorrect. How the value is getting -1 as such I didn't used that number anywhere.

If I place an extra condition

Status of Player Players [x] = Active


I dont get any errors. Guess this might work. How can I test if the triggers does work without publishing it online for the team / player placement?? Any suggestions?
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Your only real option is to test it online.

I advise writing a note somewhere that you will need to test this area in future. Then just forget about it for now and work on the rest of your map. When time comes to publish your map online you can publish it and read your note reminding you to make sure to check if teams are working.

If you are concerned about trigger happy newbies down ratting your map over trivial maters you can keep it private and run tests with trusted people until you are sure it is working as should before going public.
 
Status
Not open for further replies.
Top