Ok, first things first. I am REALLY new at JASS. This is literally my second day using it so bare with me. I have just been messing around trying to make some spells and some with JASS just to try and improve my skills.
Second:
This is the code I put together this morning:
When I try to run warcraft/enable the trigger, I get the error message "Line 30 (the sleep action) Invalid Argument Type (integer)"
What is wrong?? [/code]
Second:
This is the code I put together this morning:
JASS:
function Trig_MyFirstSpell_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A001' ) ) then
return false
endif
return true
endfunction
function Trig_MyFirstSpell_Actions takes nothing returns nothing
call AddSpecialEffectLocBJ( GetUnitLoc(GetSpellTargetUnit()), "Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl" )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetSpellTargetLoc(), 100.00, 0), "Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl" )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetSpellTargetLoc(), 100.00, 90.00), "Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl" )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetSpellTargetLoc(), 100.00, 180.00), "Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl" )
call AddSpecialEffectLocBJ( PolarProjectionBJ(GetSpellTargetLoc(), 100.00, 270.00), "Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl")
call CreateUnitAtLoc ( GetOwningPlayer( GetTriggerUnit()), 'n000' , GetUnitLoc(GetSpellTargetUnit()), 0.00)
call IssueTargetOrderBJ ( bj_lastCreatedUnit , 'A000', GetSpellTargetUnit())
call TriggerSleepAction(1.00) //ERROR HERE!! <--
call KillUnit (bj_lastCreatedUnit)
endfunction
//===========================================================================
function InitTrig_MyFirstSpell takes nothing returns nothing
set gg_trg_MyFirstSpell = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MyFirstSpell, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_MyFirstSpell, Condition( function Trig_MyFirstSpell_Conditions ) )
call TriggerAddAction( gg_trg_MyFirstSpell, function Trig_MyFirstSpell_Actions )
endfunction
When I try to run warcraft/enable the trigger, I get the error message "Line 30 (the sleep action) Invalid Argument Type (integer)"
What is wrong?? [/code]
Last edited by a moderator: