Error about JASS in WE

Status
Not open for further replies.

sPy

sPy

Level 22
Joined
Apr 10, 2009
Messages
380
Hello guys, recently I just learned a little bit about JASS and I gave it a try. I used JassCraft to practice and used it's Syntax Checker. I corrected a lot of things, but when I CnP to one of WE trigger, a lot of error appeared.

So, can anyone help me? Do I need a certain program to fix this? Sorry for my bad English =(
 
Wait wait that doesn't seemed like it, the tutorial didn't says it's vJass.
Anyway, I'll post the code. First time doing it, so it might have problem.
JASS:
function Trig_Chakra_Force_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A03F' ) ) then
        return false
    endif
    return true
endfunction

function GetEnumDestructablefunction takes nothing returns nothing
    call KillDestructable( GetEnumDestructable() )
endfunction

function GetExplodedUnitfunction takes nothing returns nothing
    call SetUnitExploded( GetEnumUnit(), true )
endfunction

function UnitType1 takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction

function UnitType2 takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false )
endfunction

function UnitType3 takes nothing returns boolean
    return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetSpellAbilityUnit())) == true )
endfunction

function UnitType4 takes nothing returns boolean
    return ( GetUnitStateSwap(UNIT_STATE_LIFE, GetFilterUnit()) <= 230.00 )
endfunction

function UnitTypeLauncher3 takes nothing returns boolean
    return GetBooleanAnd ( UnitType3(), UnitType4() )
endfunction

function UnitTypeLauncher2 takes nothing returns boolean
    return GetBooleanAnd ( UnitType2(), UnitTypeLauncher3() )
endfunction

function UnitTypeLauncher1 takes nothing returns boolean
    return GetBooleanAnd ( UnitType1(), UnitTypeLauncher2() )
endfunction

function Trig_Chakra_Force_Actions takes nothing returns nothing
    local integer ChakraForceLevel = GetUnitAbilityLevel( GetSpellAbilityUnit(), 'A03F')
    local location ChakraForceTarget = GetSpellTargetLoc()
    local unit array ChakraForceBall
    set ChakraForceBall[1] = CreateUnitAtLoc( GetOwningPlayer(GetSpellAbilityUnit()), 'n00L', ChakraForceTarget, 270.00)
    call UnitApplyTimedLife( ChakraForceBall[1], 'BTLF', 3.00 )
    call RemoveLocation(ChakraForceTarget)
loop
    exitwhen IsUnitAliveBJ(ChakraForceBall[1]) == true 
    call SetUnitScalePercent( ChakraForceBall[1], 104.00, 104.00, 104.00 )
endloop
    call EnumDestructablesInCircleBJ( 400.00, ChakraForceTarget, function GetEnumDestructablefunction )
    set ChakraForceBall[2] = CreateUnitAtLoc( GetOwningPlayer(GetSpellAbilityUnit()), 'n00M', ChakraForceTarget, 270.00)
    call UnitApplyTimedLife( ChakraForceBall[2], 'BTLF', 0.50 )
    call UnitAddAbility( ChakraForceBall[2], 'A03G' )
    call SetUnitAbilityLevel( ChakraForceBall[2], 'A03G', ChakraForceLevel )
    call IssueImmediateOrder(ChakraForceBall[2], "fanofknives" )
    call ForGroupBJ( GetUnitsInRangeOfLocMatching(500.00, ChakraForceTarget, Condition(function UnitType1 )), function GetExplodedUnitfunction )
    call RemoveLocation(ChakraForceTarget)
    set ChakraForceBall[1] = null
    set ChakraForceBall[2] = null
endfunction

//===========================================================================
function InitTrig_Chakra_Force takes nothing returns nothing
    set gg_trg_Chakra_Force = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Chakra_Force, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Chakra_Force, Condition( function Trig_Chakra_Force_Conditions ) )
    call TriggerAddAction( gg_trg_Chakra_Force, function Trig_Chakra_Force_Actions )
endfunction
It looks fine in JassCraft. And surely, I'll give it a try about the JNGP thing. You might felt weird about the spell, because I haven't tried it ingame to see whether it really like what I wanted. =(
 
Sure. Here you go:
Clipboard02.jpg
 
Status
Not open for further replies.
Back
Top