| 12-31-2006, 10:09 PM | #1 | |
The line "call ForGroupBJ(GetUnitsInRangeOfLocMatching(600.00,WS_Caster_loc),Condition(function WS_Filter_unit)), function Move_Caster)" is my problem.. Whenever I try to enable this trigger, it just says: Quote:
JASS:function WS_Ability_ID takes nothing returns boolean return GetSpellAbilityId() == 'A004' endfunction function WS_Filter_unit takes nothing returns boolean return (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true) endfunction function Move_Caster takes nothing returns nothing local unit WS_Picked_unit = GetEnumUnit() local location WS_Picked_unit_loc = GetUnitLoc(WS_Picked_unit) local integer gh = GetUnitAbilityLevelSwapped('A004',GetTriggerUnit()) local real kj = GetRandomReal(50.00,(I2R(GetUnitAbilityLevelSwapped('A004',GetTriggerUnit()))*75.00)) call SetUnitPositionLoc(GetTriggerUnit(),WS_Picked_unit_loc) call AddSpecialEffectTargetUnitBJ("chest",WS_Picked_unit, "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl" ) call DestroyEffectBJ(GetLastCreatedEffectBJ()) call UnitDamageTargetBJ(GetTriggerUnit(),WS_Picked_unit, kj,ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL) call SetUnitAnimation(GetTriggerUnit(), "attack") call CreateNUnitsAtLoc(1,'h003',GetOwningPlayer(GetTriggerUnit()),WS_Picked_unit_loc, 0.00) call SetUnitAbilityLevelSwapped('A005', GetLastCreatedUnit(), gh) call IssueTargetOrderBJ(GetLastCreatedUnit(),"thunderbolt",WS_Picked_unit) call UnitApplyTimedLifeBJ(1.50,'BTLF',GetLastCreatedUnit()) call RemoveLocation(WS_Picked_unit_loc) set WS_Picked_unit_loc = null set WS_Picked_unit = null endfunction function WS_Actions takes nothing returns nothing local unit WS_Caster = GetTriggerUnit() local location WS_Caster_loc = GetUnitLoc(WS_Caster) local integer mb = (R2I(GetUnitAbilityLevelSwapped('A004',WS_Caster))) local group WS_Group call ShowUnit(WS_Caster, false) call PolledWait(5, - mb) call ForGroupBJ(GetUnitsInRangeOfLocMatching(600.00,WS_Caster_loc),Condition(function WS_Filter_unit)), function Move_Caster) call ShowUnit(WS_Caster, true) call RemoveLocation(WS_Caster_loc) call DestroyGroup(WS_Group) set WS_Group = null set WS_Caster = null set WS_Caster_loc = null endfunction //=========================================================================== function InitTrig_Water_Strike takes nothing returns nothing set gg_trg_Water_Strike = CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Water_Strike,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_Water_Strike,Condition(function WS_Ability_ID)) call TriggerAddAction(gg_trg_Water_Strike,function WS_Actions) endfunction Can anyone help? Thx in advance Tinki3 |
| 01-01-2007, 05:44 AM | #2 |
Well...read what it's telling you =P. It says "invalid number of arguments", and it's right. You are using 3 arguments when it only takes 2. JASS:function ForGroupBJ takes group whichGroup, code callback returns nothing |
| 01-01-2007, 05:47 AM | #3 |
I'm praying your going to clean all those BJ's... |
| 01-01-2007, 12:30 PM | #4 |
exchange that line to this: call ForGroupBJ(GetUnitsInRangeOfLocMatching(600.00,WS_Caster_loc,Condition(function WS_Filter_unit)), function Move_Caster) |
