- Joined
- Jul 28, 2008
- Messages
- 211
When i try to save my map, it reports an error : Function Redeclared.
Here's my script:
I know its messy and noobish, and can be done in a much better way but i started jass not a long time ago, so im still learning.
It says that function Conditions is redeclared.
Can someone help me?
Here's my script:
JASS:
globals
real rangeA
unit casterA
location locA
real damageA
player ownerA
string missleA
real angleA
endglobals
function Missle takes nothing returns nothing
local unit caster = casterA
local location loc = locA
local real damage = damageA
local real range = rangeA
local player owner = ownerA
local real angle = angleA
local string missle = missleA
call AddSpecialEffectLoc( missle, loc)
call DamageUnits( loc, damage, range, owner, caster )
set loc = PolarProjectionBJ(loc, 10, angle)
endfunction
function Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'zxcv'
endfunction
function Trig_Wave_Actions takes nothing returns nothing
local timer t = CreateTimer()
local unit caster = GetSpellAbilityUnit()
local location casterLoc = GetUnitLoc(caster)
local real angle = GetUnitFacing(caster)
local real radius = 50
local real damage = 25
local player owner = GetOwningPlayer(caster)
local string missle = "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl"
local location place = GetUnitLoc( GetSpellAbilityUnit() )
set casterA = caster
set missleA = missle
set angleA = angle
set rangeA = radius
set damageA = damage
set ownerA = owner
set locA = place
call TimerStart( t, 0.04, true, function Missle)
call TriggerSleepAction(3)
call DestroyTimer(t)
set t = null
set caster = null
set casterA = null
set owner = null
set ownerA = null
set casterLoc = null
set place = null
set locA = null
endfunction
//===========================================================================
function InitTrig_Wave takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerAddCondition( t, Condition ( function Conditions ) )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( t, function Trig_Wave_Actions )
endfunction
I know its messy and noobish, and can be done in a much better way but i started jass not a long time ago, so im still learning.
It says that function Conditions is redeclared.
Can someone help me?