This is a trigger to upgrade a research building. Basically, when a player enters the region it should check if he has enough energy for the upgrade. If so, it should also check if the research isn't maxed out already. To do this I made the following trigger, but it when I try to go over the maximum energy value it gives me an overflow error (in stead of a message: "already fully energized). Why is this?
REV = Required Energy Value (how much energy you need for the upgrade. there are a couple of levels in the upgrades so i check for the CEV)
CEV = Current Energy Value (what level the research is currently)
MEV = Maximum Energy Value (the research level cap)
The CEV starts at 0 and the MEV is 2.
I thought I set the trigger up correctly, It can't go past the max level cap right? Why does it still give an overflow error?
This is a trigger to upgrade a research building. Basically, when a player enters the region it should check if he has enough energy for the upgrade. If so, it should also check if the research isn't maxed out already. To do this I made the following trigger, but it when I try to go over the maximum energy value it gives me an overflow error (in stead of a message: "already fully energized). Why is this?
REV = Required Energy Value (how much energy you need for the upgrade. there are a couple of levels in the upgrades so i check for the CEV) CEV = Current Energy Value (what level the research is currently) MEV = Maximum Energy Value (the research level cap)
The CEV starts at 0 and the MEV is 2. I thought I set the trigger up correctly, It can't go past the max level cap right? Why does it still give an overflow error?
plz type in the exact overflow error you get
The error I get is:
Trigger Error in 'gt_BaseEnergyPoints_Func': An error occurred starting Starcraft II. Please try again. e_arrayIndexOverflow
Oh nevermind, how stupid of me. I should check the level cap before checking the players minerals.
yeah man - overflow means you're index is too big... its kind of obvious, i thought