I don’t know what the problem is, but JassCraft gives me ~27 statement out of function, comparing two variables of different primitive types (except real and integer) is not allowed, and it also says my all locals are un-declared, and not arrays!
Here's the code:
Here's the code:
PHP:
function Shadow takes unit shadowedunit real faderate real duration returns nothing
local unit array Shadows
local integer array vertex
local timer SDuration
call StartTimerBJ( SDuration, false, 30 )
set bj_forLoopAIndex = 1
loop
exitwhen TimerGetRemaining(SDuration) == 0.00
call CreateNUnitsAtLoc( 1, GetUnitTypeId(shadowedunit), GetOwningPlayer(shadowedunit), GetUnitLoc(shadowedunit), GetUnitFacing(shadowedunit) )
set Shadows[bj_forLoopAIndex] = GetLastCreatedUnit()
call SetUnitVertexColor( Shadows[bj_forLoopAIndex], 100, 100, 100, 50 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = bj_forLoopAIndex
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set vertex[bj_forLoopAIndex] = vertex[bj_forLoopAIndex] - faderate
if vertex[bj_forLoopAIndex] == 0 then
call RemoveUnit( Shadows[bj_forLoopAIndex] )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call IssueTargetOrder( Shadows[bj_forLoopAIndex], "move", shadowedunit )
call SetUnitTimeScalePercent( Shadows[bj_forLoopAIndex], 15.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
returns nothing
endfunction