• 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] Line causing syntax errors?

Status
Not open for further replies.
I've looked over this line about a hundered times, i cant seem to find out what's causing the syntax error.

JASS:
	if(OnIce == true) then
      if Terrain != TerrainSlide[4] then
        SetUnitPosition(u, x + speed * Cos(GetUnitFacing(u) * bj_DEGTORAD), y + speed * Sin(GetUnitFacing(u) * bj_DEGTORAD))
      else
        SetUnitPosition(u, x + speed * Cos((GetUnitFacing(u) + 180) * bj_DEGTORAD), y + speed * Sin((GetUnitFacing(u) + 180) * bj_DEGTORAD))
      endif
	endif
the two "SetUnitPosition's" cause syntax's, but if i replace them with "Set x = GetTriggerUnit()" (Dummy) it compiles, Any ideas?

Edit: Forgot to mention,
JASS:
        set x = Atan2(x + speed * Cos(GetUnitFacing(u) * bj_DEGTORAD), y + speed * Sin(GetUnitFacing(u) * bj_DEGTORAD))
compiles, lol.
 
Status
Not open for further replies.
Top