"specialEffect" is not a valid JASS type. You probably meant to use
effect
.
"with initial value 0" is not valid JASS code. You need to write the initial value to the array indices before you use them, but in your case this is not needed since they have an uninitialized value of 0 already.
"with size 1" is not valid JASS code. JASS arrays are dynamic arrays that will automatically allocate space up the the array maximum size constant.
"Set" is not valid JASS. Like a lot of programming languages, JASS is case sensitive. To set a variable you start the line with
set
.
"(Last created special effect)" is not valid JASS. You either assign the variable the the effect when you create it, or you need to call the function that GUI wraps
GetLastCreatedEffectBJ
or reference the variable GUI uses internally,
bj_lastCreatedEffect
, directly.
I do not think calling
TriggerSleepAction
in the initialization thread is allowed. It is likely to cause a thread crash or unexpected behaviour such as delaying the initialization of unrelated triggers.
"For each Integer A from 1 to EffectListEnd, do (Actions)" is not valid JASS. JASS does not support for arrays, you need to emulate them using a conventional loop. This is done by starting the loop with
loop
, applying the end condition check at the top of the loop body with an
exitwhen boolean
statement where boolean is replaced with your test logic, and then perform the increment logic to your variable at the bottom of the loop body.
"Special Effect - Destroy" is not valid JASS. You probably meant to call
DestroyEffect
.
"(Integer A)" is not valid JASS. Reference the variable used internally from the extract below.
Code:
// Utility function vars
integer bj_forLoopAIndex = 0
integer bj_forLoopBIndex = 0
integer bj_forLoopAIndexEnd = 0
integer bj_forLoopBIndexEnd = 0
If you want to use GUI, then stick to using GUI. Otherwise you will need to write everything in JASS. JASS does not understand English text form of GUI, that is not valid JASS code.
Your spell logic does not really make sense. You are not creating any special effects and instead are trying setup and destroy a list once only at map initialisation after stalling the entire map initialisation thread for approximately 10 real time seconds. You probably want to process the special effects in the action function body.