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
and error says that
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.
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
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
Last edited: