• 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] Help with error

Status
Not open for further replies.
Level 3
Joined
Dec 27, 2008
Messages
56
JASS:
 call CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE),'DUMM',GetUnitLoc(JumpingUnit,GetUnitFacing(JumpingUnit)
 set Dummy=GetLastCreatedUnit()

I use JNGP and i got following errors:
-Missing ')'
-To many argument passed to this function
-syntax error

And another error
JASS:
   call SetUnitPositionLoc(Dummy,PolarProjectionBJ(Dummy,DistanceLeft,GetUnitFacing(Dummy)))
errors:
-Cannot convert unit to location

Why?? Help plz
 
Level 11
Joined
Mar 31, 2009
Messages
732
Change first chunk of code to:

JASS:
set Dummy = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE), 'DUMM', GetUnitLoc(JumpingUnit),GetUnitFacing(JumpingUnit))

Change second chunk of code to:

JASS:
 call SetUnitPositionLoc(Dummy, PolarProjectionBJ(GetUnitLoc(Dummy), DistanceLeft, GetUnitFacing(Dummy)))
 
Status
Not open for further replies.
Top