• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Syntax error

Status
Not open for further replies.
Level 7
Joined
Aug 19, 2009
Messages
278
I was making a knockback spell... Its not complete yet. But, the problem is when i compile it, it shows syntax error.

JASS:
function Trig_Untitled_Trigger_003_Conditions takes nothing returns boolean
if (udg_pb == 1) then
return true
endif
return false
endfunction

function Trig_Untitled_Trigger_003_Actions takes nothing returns nothing
local real y1
local real x2 = GetUnitX(udg_unit)
local real y2 = GetUnitX(udg_unit)
local real d = 500
local real x1 = (Cos(udg_m * bj_DEGTORAD) * d)
set x2 = x2 + 1
set y2 = y2 + (udg_m*x1)
SetUnitX(udg_unit, x2)
SetUnitY(udg_unit, y2)
if (x2>=x1) then
set udg_pb = 0
endif
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_003 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_003 = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_003, 0.05 )
    call TriggerAddCondition( gg_trg_Untitled_Trigger_003, Condition( function Trig_Untitled_Trigger_003_Conditions ) )
    call TriggerAddAction( gg_trg_Untitled_Trigger_003, function Trig_Untitled_Trigger_003_Actions )
endfunction

I know this is not a perfect knock back but i can't test it due to the error.
 

Attachments

  • pb.w3m
    16.9 KB · Views: 79
Level 7
Joined
Aug 19, 2009
Messages
278
Which one is more effective of the both?:vw_wtf:

I thought the former because in it there are no local variables being created.

Any way i got no idea...
 
Status
Not open for further replies.
Top