Cannot convert unitevent to playerunitevent

Status
Not open for further replies.

LearningCode

New Member
Reaction score
24
Yea..
I was trying to make a trigger register an event for when an ability was cast.
Player casts
Trigger checks ability ID
Trigger does action

Problem is, I've got a syntax error and I don't know how to fix it =x
(Still learning)

JASS:
function GaiaCond takes nothing returns boolean
   return GetSpellAbilityId() == 'Kchn'
endfunction

function Trig_GaiaBladeCast_Actions takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_GaiaBladeCast takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    local integer i = 0
    local player p
    loop
    exitwhen i==8
    set p =Player(i)
    call TriggerRegisterPlayerUnitEvent(t,p,EVENT_UNIT_SPELL_EFFECT,null)  //This is where the error is
    set i =i+1
    endloop
    call TriggerAddCondition(t, Condition(function GaiaCond))
    call TriggerAddAction( t, function Trig_GaiaBladeCast_Actions )
endfunction


Any help? xD


[EDIT]
Okay, figured it out.

I'm supposed to use:



Not:
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top