MagnaGuard
Active Member
- Reaction score
- 49
So after coming back to map making, I'm trying to relearn some Jass and ran into a few problems with this simple code.
If you can just tell me whats wrong, that would be helpful.
JASS:
function Trig_Flare_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A000039;
endfunction
function Trig_Flare_Actions takes nothing returns nothing
local unit trig = GetTriggerUnit()
local ability lev = GetUnitAbilityLevel(trig,039;A000039;) //Cannot convert integer to ability
local real damage = 100* lev //bad types for binary operator
local location loc = GetSpellTargetLoc()
call UnitDamagePoint(trig, 1.0, 1800, GetLocationX(loc), GetLocationY(loc), damage, true, false, ATTACK_TYPE_UNIVERSAL, DAMAGE_TYPE_CHAOS, WEAPON_TYPE_CHAOS) // Undeclared variable TTACK_TYPE_UNIVERSAL, DAMAGE_TYPE_CHAOS, WEAPON_TYPE_CHAOS
endfunction
//===========================================================================
function InitTrig_Flare takes nothing returns nothing
set gg_trg_Flare = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Flare, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Flare, Condition( function Trig_Flare_Conditions ) )
call TriggerAddAction( gg_trg_Flare, function Trig_Flare_Actions )
endfunction
If you can just tell me whats wrong, that would be helpful.