• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Somekind Error

Status
Not open for further replies.
Level 7
Joined
Nov 19, 2007
Messages
253
Hi im new on jass i converted normal trigger to jass and fixed it to work and it works but when i press test map i get error that something isnt working and causing error (but trigger works perfectly) here it is
JASS:
function Trig_Avatar_aura_Func001C takes nothing returns boolean
    if ( not ( UnitHasBuffBJ(GetAttacker(), 'B001') == true ) ) then
        return false
    endif
    if ( not ( IsUnitIllusionBJ(GetAttacker()) == false ) ) then
        return false
    endif
    return true
endfunction

function Trig_Avatar_aura_Conditions takes nothing returns boolean
    if ( not Trig_Avatar_aura_Func001C() ) then
        return false
    endif
        return true
endfunction

function Trig_Avatar_aura_Func004Func003C takes nothing returns boolean
    if ( not ( GetRandomInt(1, 100) <= 30 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Avatar_aura_Func004C takes nothing returns boolean
    if ( not Trig_Avatar_aura_Func004Func003C() ) then
        return false
    endif
    return true
endfunction

function Trig_Avatar_aura_Actions takes nothing returns nothing
    local unit AaAttacker = GetAttacker()
    if ( Trig_Avatar_aura_Func004C() ) then
        call AddSpecialEffectTargetUnitBJ( "origin", AaAttacker, "Abilities\\Spells\\Human\\Avatar\\AvatarCaster.mdl" )
        call ModifyHeroStat( bj_HEROSTAT_STR, AaAttacker, bj_MODIFYMETHOD_ADD, 1 )
        call ModifyHeroStat( bj_HEROSTAT_AGI, AaAttacker, bj_MODIFYMETHOD_ADD, 1 )
        call ModifyHeroStat( bj_HEROSTAT_INT, AaAttacker, bj_MODIFYMETHOD_ADD, 1 )
        call TriggerSleepAction( 20.00 )
        call ModifyHeroStat( bj_HEROSTAT_STR, AaAttacker, bj_MODIFYMETHOD_SUB, 1 )
        call ModifyHeroStat( bj_HEROSTAT_AGI, AaAttacker, bj_MODIFYMETHOD_SUB, 1 )
        call ModifyHeroStat( bj_HEROSTAT_INT, AaAttacker, bj_MODIFYMETHOD_SUB, 1 )
    else
    endif
endfunction

//===========================================================================
function InitTrig_Avatar_Aura takes nothing returns nothing
    local trigger Avatar_Aura = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(Avatar_Aura, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition(Avatar_Aura, Condition( function Trig_Avatar_aura_Conditions ) )
    call TriggerAddAction(Avatar_Aura, function Trig_Avatar_aura_Actions )
    set Avatar_Aura = null
endfunction

and error says that
JASS:
function InitTrig_Avatar_Aura takes nothing returns nothing
this cause somekind error

And how do I remove special effect leak ?

P.S. Im using NewGen WE

EDIT: heres screenshot if you didnt understand what i said.
 

Attachments

  • error.JPG
    error.JPG
    87.5 KB · Views: 78
Last edited:
Level 7
Joined
Nov 19, 2007
Messages
253
I had trigger variable named AvatarAura i deleted it and its working now! thx for help
But theres another problem i cant see my map in wc3 when trying to create it
 
Status
Not open for further replies.
Top