So agian syntax error

Nerfpl

New Member
Reaction score
53
I tried create spell in JASS only and of course i filed at Syntax error. whats wrong?

JASS:
function Trig_Fire_Barrage_Actions takes nothing returns nothing
    local integer int = GetUnitAbilityLevelSwapped('A00Z', GetSpellAbilityUnit())
    local location p1 = GetSpellTargetLoc()
    local location p2
    local real angle = 0
    local integer x1 = 1
    local integer x2 = int
    loop
            exitwhen x1 > x2
        set p2 = PolarProjectionBJ(p1, 300 + (50 * (int - 1)), angle)
        call CreateUnitAtLoc(Player(0), 'H007', p2, AngleBetweenPoints(p2, p1))
        call UnitApplyTimedLife(GetLastCreatedUnit(), 'BTLF', 10.5)
        IssuePointOrderLoc( GetLastCreatedUnit(), "clusterrockets", p1)
        set angle = angle + (360 / int)
        call RemoveLocation(p2)
        set p2 = null
        set x1 = x1 + 1
    endloop
    call RemoveLocation(p1)
    set p1 = null
    endfunction
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
I'd take a guess at:

IssuePointOrderLoc( GetLastCreatedUnit(), "clusterrockets", p1)

vs.

call IssuePoint....
 

Tom Jones

N/A
Reaction score
437
If you at some point wonder why your dummy unit isn't working, the answer is that the function your using isn't assigning the created unit to bj_lastCreatedUnit, thus GetLastCreatedUnit() will return either null or some undesired unit.
 

Nerfpl

New Member
Reaction score
53
If you at some point wonder why your dummy unit isn't working, the answer is that the function your using isn't assigning the created unit to bj_lastCreatedUnit, thus GetLastCreatedUnit() will return either null or some undesired unit.

yea it wasnt working xD

so you say i should make
JASS:
local unit dummy
set dummy = bj_lastCreatedUnit

then refer to dummy?

also bonus question to kip new thread. what i should input in
JASS:
call PlaySound()

because when i put "gg_snd_GoodJob" there, it wont work
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top