So, I got the weirdest arithmetic problem ever.
I declared this variable:
CurrentWaves = 1
When I do the arithmetic, for SOME UNKNOWN REASON, I get back a one. This map editor is just trolling me, has a mind of its own, I tell ya.
(CurrentWaves - 1) = 1???
Yes please show us a copy of the relevant code exactly as it appears, using Ctrl+F11 to preview the code joemart, so that we can reproduce/find the problem.
Ok... so currentWaves is a global variable. You must be setting it to 2 somewhere else. You can search (Ctrl+F) your script for gv_currentWaves to find where else you set it.
Hahaha, nevermind everything, i just fixed it. I just made another trigger that summed currentWaves. And since the equation that i just showed u was being used in a certain trigger, i moved it to a new trigger and somehow it worked. I just started looking where it was being modified, and just came up with the idea to make a new trigger just for it. Thanks for every help, appreciate it.
So, I got the weirdest arithmetic problem ever. I declared this variable: CurrentWaves = 1
When I do the arithmetic, for SOME UNKNOWN REASON, I get back a one. This map editor is just trolling me, has a mind of its own, I tell ya. (CurrentWaves - 1) = 1???
@joemart06: Go
Can you post the code please?
@DeltaV: Go
Sorry, was really beat last night,
cw = 1 <integer>
z = 5 <integer>
var = ((z - (cw - 1))) mod 6) <integer>
in other words, it's
((5 -( 1 - 1))) mod 6) =
(( 5 - (0))) mod 6) =
(( 5 )) mod 6) =
5
That's what its supposed to give me, but the problem is in the (cw - 1) which returns a 1.
Throw test messages, at each step and for each variable especialy CW
It would be helpful to preview the Galaxy code in the editor and copy and paste the relevant lines verbatim into here.
Yes please show us a copy of the relevant code exactly as it appears, using Ctrl+F11 to preview the code joemart, so that we can reproduce/find the problem.
Was trying to figure out where you viewed the script, but here it is:
Global Variable
int gv_currentWaves;
gv_currentWaves = 1;
Local Variable
int lv_zerglets;
int lv_var3;
Variable Initialization
lv_zerglets = 5;
lv_var3 = ModI((lv_zerglets - (gv_currentWaves - 1)), 6);
@joemart06: Go
Ok... so currentWaves is a global variable. You must be setting it to 2 somewhere else. You can search (Ctrl+F) your script for gv_currentWaves to find where else you set it.
@DeltaV: Go
Hahaha, nevermind everything, i just fixed it. I just made another trigger that summed currentWaves. And since the equation that i just showed u was being used in a certain trigger, i moved it to a new trigger and somehow it worked. I just started looking where it was being modified, and just came up with the idea to make a new trigger just for it. Thanks for every help, appreciate it.
This is basically the new trigger:
And it was a headache to find the problem...
bool gt_Spawn_Func (bool testConds, bool runActions) {
Actions
if (!runActions) { return true; }
TriggerExecute(gt_SpawnHydraWaves, true, false);
TriggerExecute(gt_SpawnZergletWaves, true, false);
gv_currentWaves = (gv_currentWaves + 1);
return true;
}