Hey all, I've created a 4 player TD map based off of OneTwoSC's advanced TD tutorial, so the triggers are very similar for the most part if you're familiar with his tutorial.
Basically what I have set up is this:
In the map there is a leaderboard which contains the number of kills each player has achieved. So the triggers I have setup basically say, when any unit dies belonging to player 9 (the owner of the wave spawned units), the [killing player] gets credit for the kill and that is reflected on the leaderboard.
The weird part is that EVERYTHING works, but regardless of everything working I get this annoying "error" text on the screen which says that the trigger "doesnt" work. Here is a screenshot to help show what im talking about.
The exact text of the error is :
"Trigger Error in 'gt_EnemyUnitDies_Func': An error has occured starting Starcraft II. Please try again. e_arrayIndexOverflow"
Does anyone understand what this error is trying to tell me? Removing the connection between the unit death and the leaderboard fixes it, but I want a leaderboard damnit!
If anyone can help me, I would forever be indebted to you. I've been messing around/troubleshooting this bug for over a week now and I've decided to see if any of you smart people can figure this out! I'm heavily tempted to believe that this is more a bug with the editor at this point then a user error thing because I'm running this EXACT code in another map and it works flawlessly. (I think the "Undo" ability fucks up triggers, I used a lot of "Undo"s in this map and I've noticed weird stuff happening the more I use it)
can you post your " Enemy Unit Dies " trigger? i think an arrayindexoverflow is when ever there is a number entered into an array that bigger then how big the array is.
Check out the trigger that give out your error. Pay attention to any array you're using. If you use no array, this should be the problem with player 16 get returned as an integer value. (the array for player has a size of 15) So your map will work fine since there's no player 16.
For whatever reason, it was trying to include player 9 for the player kills too!
I just updated/set my global variable to "Player Kills[12]" and that fixed it (was Player Kills[4], wasn't including the computer just the 4 human players. that apparently matters!)
It took me about 5 seconds to figure out by simplying starting a map from scratch and creating the new triggers. Funny how a week's worth of troubleshooting was outdone by me starting fresh and realizing what the problem might be after fiddling around on a new map for literally 10 seconds.
Anyway, this whole thing has helped me understand how array's work a bit better :P
Hope this thread helps any future editors out there in some way. (I wish the errors weren't so generic though, oh well)
Hey all, I've created a 4 player TD map based off of OneTwoSC's advanced TD tutorial, so the triggers are very similar for the most part if you're familiar with his tutorial.
Basically what I have set up is this:
In the map there is a leaderboard which contains the number of kills each player has achieved. So the triggers I have setup basically say, when any unit dies belonging to player 9 (the owner of the wave spawned units), the [killing player] gets credit for the kill and that is reflected on the leaderboard.
The weird part is that EVERYTHING works, but regardless of everything working I get this annoying "error" text on the screen which says that the trigger "doesnt" work. Here is a screenshot to help show what im talking about.
The exact text of the error is : "Trigger Error in 'gt_EnemyUnitDies_Func': An error has occured starting Starcraft II. Please try again. e_arrayIndexOverflow"
Does anyone understand what this error is trying to tell me? Removing the connection between the unit death and the leaderboard fixes it, but I want a leaderboard damnit!
If anyone can help me, I would forever be indebted to you. I've been messing around/troubleshooting this bug for over a week now and I've decided to see if any of you smart people can figure this out! I'm heavily tempted to believe that this is more a bug with the editor at this point then a user error thing because I'm running this EXACT code in another map and it works flawlessly. (I think the "Undo" ability fucks up triggers, I used a lot of "Undo"s in this map and I've noticed weird stuff happening the more I use it)
can you post your " Enemy Unit Dies " trigger? i think an arrayindexoverflow is when ever there is a number entered into an array that bigger then how big the array is.
Check out the trigger that give out your error. Pay attention to any array you're using. If you use no array, this should be the problem with player 16 get returned as an integer value. (the array for player has a size of 15) So your map will work fine since there's no player 16.
Sure, heres a photo of the triggers. The leaderboard stuff is under my map initialize trigger.
I set the hostile unit as "player 9" so I had the potential to make this an 8 player map.
Also, player kills variable is an integer of 4, not 2. Was just testing something out real quick when i took the screen.
I took a look at the source code that gets compiled and I noticed this...this corresponds directly to the error it seems? (Bottom of screenshot)
For whatever reason, it was trying to include player 9 for the player kills too!
I just updated/set my global variable to "Player Kills[12]" and that fixed it (was Player Kills[4], wasn't including the computer just the 4 human players. that apparently matters!)
It took me about 5 seconds to figure out by simplying starting a map from scratch and creating the new triggers. Funny how a week's worth of troubleshooting was outdone by me starting fresh and realizing what the problem might be after fiddling around on a new map for literally 10 seconds.
Anyway, this whole thing has helped me understand how array's work a bit better :P
Hope this thread helps any future editors out there in some way. (I wish the errors weren't so generic though, oh well)