- Joined
- Jul 17, 2006
- Messages
- 145
Alright, this code here SHOULD work but the syntax checker went retarted when i ran the code through it:
please put this into warcraft 3 WE and try to enable it, because it should work and yet it dosent for example, one of the errors is:
All help would be apprecated, as this is the last known bug stopping me from starting beta testing and eventual releace on my new map version (i normally beta test for about a week to make shure there nothing i missed)
JASS:
function Trig_Captian_Kasiths_Tital_Wave_Knockback_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02E' ) ) then
return false
endif
return true
endfunction
function Trig_Captian_Kasiths_Tital_Wave_Knockback_Actions takes nothing returns nothing
set udg_Temp_Unit_Group = GetUnitsInRangeOfLocAll(650.00, GetUnitLoc(GetSpellAbilityUnit()))
set udg_Temp_Unit = GetSpellAbilityUnit()
call ForGroupBJ( udg_Temp_Unit_Group, function Trig_Captian_Kasiths_Tital_Wave_Knockback_Actions2 )
set udg_Temp_Unit_Group = null
set udg_Temp_Unit = null
set udg_Temp_Unit2 = null
set udg_Temp_Integer = null
endfunction
function Trig_Captian_Kasiths_Tital_Wave_Knockback_Actions2 takes nothing returns nothing
if ( function Trig_Captian_Kasiths_Tital_Wave_Knockback_ActionsCond ) then
local timer t
set udg_Temp_Unit2 = GetEnumUnit()
set udg_Temp_Integer = DistanceBetweenPoints(GetUnitLoc(udg_Temp_Unit), GetUnitLoc(udg_Temp_Unit2))
call TriggerSleepAction( udg_Temp_Integer )
set t CreateTimer()
call TimerStart(t, 0.01, true, function Knockback)
call TriggerSleepAction( ((GetUnitAbilityLevelSwapped('A02E', udg_Temp_Unit) * 150) + 350) - udg_Temp_Integer)
call DestroyTimer(t)
set t = null
else
endif
endfunction
function Knockback takes nothing returns nothing
call SetUnitPositionLoc(udg_Temp_Unit2, PolarProjectionBJ(GetUnitLoc(udg_Temp_Unit), 10, AngleBetweenPoints(GetUnitLoc(udg_Temp_Unit), GetUnitLoc(udg_Temp_Unit2))))
endfunction
function Trig_Captian_Kasiths_Tital_Wave_Knockback_ActionsCond takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetOwningPlayer(GetSpellAbilityUnit())) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
//===========================================================================
function InitTrig_Captian_Kasiths_Tital_Wave_Knockback takes nothing returns nothing
set gg_trg_Captian_Kasiths_Tital_Wave_Knockback = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Captian_Kasiths_Tital_Wave_Knockback, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Captian_Kasiths_Tital_Wave_Knockback, Condition( function Trig_Captian_Kasiths_Tital_Wave_Knockback_Conditions ) )
call TriggerAddAction( gg_trg_Captian_Kasiths_Tital_Wave_Knockback, function Trig_Captian_Kasiths_Tital_Wave_Knockback_Actions )
endfunction
please put this into warcraft 3 WE and try to enable it, because it should work and yet it dosent for example, one of the errors is:
Line 508: Expected a function name
(Line 508)
call ForGroupBJ( udg_Temp_Unit_Group, function Trig_Captian_Kasiths_Tital_Wave_Knockback_Actions2 )
All help would be apprecated, as this is the last known bug stopping me from starting beta testing and eventual releace on my new map version (i normally beta test for about a week to make shure there nothing i missed)