Help me clean this. There is a syntax error.

Cokemonkey11

New Member
Reaction score
18
JASS:
call SetUnitX(rifleAttacker,(GetLocationX(PolarProjectionBJ(GetUnitLoc(centerUnit)),256,i,270))


I'm new to jass and it will take me ages to debug this.

I'm pretty sure all I need to do is move parentheses around, if anyone could help me out i'd be grateful.

Thank you,

edit - i may have changed it a bit trying to debug myself..

JASS:
    local integer i = 0
    call SetUnitX(rifleAttacker,(GetLocationX(PolarProjectionBJ(GetUnitLoc(centerUnit),256,i)),270))
//               |     unit    |                                  real                             |
//                                           |                       location                     |
//                                                             |         location     | r |r|
//                                                                        |   unit   |
    //SetUnitX(unit,real)
    //GetLocationX(location)
    //PolarProjectionBJ(location,real,real)
    //GetUnitLoc(unit)
 

Azlier

Old World Ghost
Reaction score
461
You're missing a ), somewhere... Try putting one after centerUnit.
 

Expelliarmus

Where to change the sig?
Reaction score
48
JASS:
    local integer i = 0 //??
    local real angle = 20.//angle
    local real dist  = 256. //distance
    local location sourceloc = GetUnitLoc(centerUnit)
     // PolarProjectionBJ(source, dist, angle)
    local location p = PolarProjectionBJ(sourceloc, dist, angle)
    //call SetUnitX (  rifleAttacker ,       GetLocationX(    PolarProjectionBJ(GetUnitLoc(centerUnit) , 256, i), 270     )    ) //?? 
    // 270. is??
    call SetUnitX( rifleAttacker, GetLocationX( p ))


This is an example... just wanting to know your aim. Do not use this code - it's leaking a lot =P
 

Cokemonkey11

New Member
Reaction score
18
this is only a portion of the code - ill post the entire thing tomorow so you can see what im going for.

are you sure im missing a )?
I counted the ( and ) and they're equal...
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
Lies. It's i*270, not i, 270.

Edit: I need to see the code at the first post, not the one that's 2 posts above this one :<
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top