Staredit Network > Forums > SC2 Assistance > Topic: [Solved] Array Out of Bounds Error
[Solved] Array Out of Bounds Error
This topic is locked. You can no longer write replies here.
Aug 20 2010, 4:19 am
By: FlareForce  

Aug 20 2010, 4:19 am FlareForce Post #1



For some reason this is giving me an array out of bounds error even though I've checked it over many times and set the array size to some arbitrary number to test it. Any ideas?

In this mod, units can morph into other units so I was trying to store which unit is currently the hero of each player then have it respawn when it dies. I increased the size of the array cause it was giving me the error(though it didn't help).

Attachments:
image.JPG
Hits: 10 Size: 82.76kb



None.

Aug 20 2010, 4:42 am shmeeps Post #2



Out of curiosity, what did you increase the size of? I can't imagine the other array causing the error, since it seems to be within bounds.



None.

Aug 20 2010, 4:49 am FlareForce Post #3



heros, im thinking there gotta be some bug or underlying error that its not telling me



None.

Aug 20 2010, 4:59 am shmeeps Post #4



Whoops, I meant what did you increase it's size to*



None.

Aug 20 2010, 5:02 am FlareForce Post #5



Oh, i changed it from 5 to 11 (well i went from 5 to 152 to 11 and just kinda left it there for testing)



None.

Aug 20 2010, 7:48 am Ahli Post #6

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

I think I know the problem.
EventUnit() will return -1 as the owner of the unit because the unit is dead and has no owner anymore [-1 is considered as "any" here].
My German tips tell me that I should use something like EventPlayer() to get the owner of the dead unit.
Try that!

Post has been edited 1 time(s), last time on Aug 20 2010, 7:50 am by Ahli. Reason: We no speak Americano!




Aug 20 2010, 3:54 pm FlareForce Post #7



That makes sense, thanks. I might think of another way around it but when I tried doing EventPlayer() instead, it gave me this error
00:00:27.31 Trigger Error in 'gt_Respawn_Func': An error occurred starting StarCraft II. Please try again.e_arrayIndexUnderflow
I've never heard of an underflow error before and I would guess it would mean it was -1 but wouldn't it have given me the same error before?



None.

Aug 20 2010, 4:57 pm FlareForce Post #8



Ah, i got it, it wasn't working because I had a timer before the creating action and for some reason it didn't store the triggering player past it. Thanks for the help guys



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[02:47 am]
Symmetry -- I'll check it out this weekend!
[02:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[02:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[01:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[01:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[01:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
[01:31 am]
Ultraviolet -- Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Is it forbidden to have a large avatar?
actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
[12:20 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: https://staredit.net/profile/133367/ dude's avatar is massive
Is it forbidden to have a large avatar?
[12:04 am]
Ultraviolet -- https://staredit.net/profile/133367/ dude's avatar is massive
Please log in to shout.


Members Online: Excalibur