I have 10 buttons, that each refer to 1 of 10 slots in the cargo ship.
So button 1 = cargo slot 1, 2=2, etc. Pretty simple.
When I look up each of the slots, they will (appropriately) return "no unit" if they are empty, or the unit type if full. When they are empty though, I get the following error : 00:00:06.44 Trigger Error in 'gt_MenuClicked_Func': Parameter out of bounds in 'UnitCargo' (value: 9, min: 0, max: 0)
As I add units to the cargo, the max increases, and once it's full, I don't get an error anymore, which makes sense.
The confusing part, is despite the error, I'm still getting returns of "no unit", which is exactly what I want. Functionally, it's doing what I want exactly, but it's giving me that error. :(
Yeah, I've pretty much surrendered to the dynamically created nature of the bunkers/dropships. I'm thinking about filling my dropship with "dummy" units just to avoid the error.
I basically have a hidden dropship that i load up, then they come in from offscreen and drop everything off. But i'm showing the contents of the dropship onscreen. I can't really think of an easier solution. ><
I really appreciate the response and the confirmation of my suspicions. :D
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Anyone else seen this error?
I am attempting to lookup unit in a cargo ship.
I have 10 buttons, that each refer to 1 of 10 slots in the cargo ship.
So button 1 = cargo slot 1, 2=2, etc. Pretty simple.
When I look up each of the slots, they will (appropriately) return "no unit" if they are empty, or the unit type if full. When they are empty though, I get the following error : 00:00:06.44 Trigger Error in 'gt_MenuClicked_Func': Parameter out of bounds in 'UnitCargo' (value: 9, min: 0, max: 0)
As I add units to the cargo, the max increases, and once it's full, I don't get an error anymore, which makes sense.
The confusing part, is despite the error, I'm still getting returns of "no unit", which is exactly what I want. Functionally, it's doing what I want exactly, but it's giving me that error. :(
@CeejEngine: Go
Take a look if you can check the number of slot on a cargo unit. Seems to me that the slots are being created dynamically as the unit needs them.
That's why you get an error (at the start only the slot 0 exists), an works because it returns "no unit" anyway.
@fr0d0b0ls0n: Go
Yeah, I've pretty much surrendered to the dynamically created nature of the bunkers/dropships. I'm thinking about filling my dropship with "dummy" units just to avoid the error.
I basically have a hidden dropship that i load up, then they come in from offscreen and drop everything off. But i'm showing the contents of the dropship onscreen. I can't really think of an easier solution. ><
I really appreciate the response and the confirmation of my suspicions. :D