When I create a unit : In ...owner by 'any' = it's seem to make me the number of active player (and it doesn't give me any error) ...owner by '1 or 2 or 3 ...' = it's making me the right number of units for the chosen player but it's show me an critical error (en red) :
Parameter ouf bounds in 'sUnitCreate' (Value: 16, min: 0, max: 15) (this is what I don't know how to solve it)
Here is the trigger 1 and 2 : Set Timer and Spawning Unit
Maybe there's a problem with the Region and Owner of Unit in the Region but I don't know. Because I set all Regions 1 to 81 manually It's supposed to work for 8 players. And only the "owner of a particular building in the region will be able to spawn the chosen unit"...
...owner by 'any' = it's seem to make me the number of active player (and it doesn't give me any error)
Any is not a valid parameter to make a unit with. A unit must be owned and any is not a valid owner.
Parameter ouf bounds in 'sUnitCreate' (Value: 16, min: 0, max: 15) (this is what I don't know how to solve it)
Player 16 is not a valid value for the player. I am guessing it is failing to find a unit so you are getting the owner of null and hence it returns an invalid player number.
I think this can be because of the "Unit[Random Unit[Picked Integer]]" if the size of the array "Random Unit" is not as big as what you try to check (pick eatch int from 1 to 81), then its not going to work. Maybe? Try changing values to something specefic just to test one by one and see which part of your action does not work.
You can always try to narrow down which part of your trigger is not working. If you think its the "Zone" variable then try to set it to a fixed zone instead of picked integer. If it no more does the error, then the picked int is too big for the "Zone" array. You can always add a Text Message trigger which convert int to text so it tells you what value is the picked int. It can help to understand what's going on.
When I create a unit : In
...owner by 'any' = it's seem to make me the number of active player (and it doesn't give me any error)
...owner by '1 or 2 or 3 ...' = it's making me the right number of units for the chosen player but it's show me an critical error (en red) :
Parameter ouf bounds in 'sUnitCreate' (Value: 16, min: 0, max: 15) (this is what I don't know how to solve it)
Here is the trigger 1 and 2 : Set Timer and Spawning Unit
https://ibb.co/i9r99m
https://ibb.co/d1SAFR
Region Setting
https://ibb.co/f6Ze9m
Maybe there's a problem with the Region and Owner of Unit in the Region but I don't know.
Because I set all Regions 1 to 81 manually
It's supposed to work for 8 players.
And only the "owner of a particular building in the region will be able to spawn the chosen unit"...
Any is not a valid parameter to make a unit with. A unit must be owned and any is not a valid owner.
Player 16 is not a valid value for the player. I am guessing it is failing to find a unit so you are getting the owner of null and hence it returns an invalid player number.
I think this can be because of the "Unit[Random Unit[Picked Integer]]" if the size of the array "Random Unit" is not as big as what you try to check (pick eatch int from 1 to 81), then its not going to work. Maybe? Try changing values to something specefic just to test one by one and see which part of your action does not work.
Working on projects:
In reply to Scbroodsc2:
In reply to Scbroodsc2:
You can always try to narrow down which part of your trigger is not working. If you think its the "Zone" variable then try to set it to a fixed zone instead of picked integer. If it no more does the error, then the picked int is too big for the "Zone" array. You can always add a Text Message trigger which convert int to text so it tells you what value is the picked int. It can help to understand what's going on.
Working on projects:
In reply to Scbroodsc2:
Because it seems "doing the trigger" as the "number of active" player.
By exemple (with text)
2 active players :
"TEST 1"
"TEST 1"
*including with the error
Because I set trigger for player 1 and 2 separatly...
I resolve the problem. Thank all for your help! :)