- Joined
- Jun 10, 2008
- Messages
- 1,399
I've looked over this line about a hundered times, i cant seem to find out what's causing the syntax error.
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,
compiles, lol.
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
Edit: Forgot to mention,
JASS:
set x = Atan2(x + speed * Cos(GetUnitFacing(u) * bj_DEGTORAD), y + speed * Sin(GetUnitFacing(u) * bj_DEGTORAD))