• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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 10
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