Unfindable syntax error/missing ')'

bOb666777

Stand against the ugly world domination face!
Reaction score
117
i get a few "missing ')'" errors and 1-2 syntax errors in that line:
JASS:
set udg_PinballScatterFaceAngle[currentloop] = ( ( udg_PinballScatterFaceAngle[currentloop] + 180.00 ) + ( ( AngleBetweenPoints(GetUnitLoc(PinballScatterUnit)), udg_PinballScatterTempPoint) - udg_PinballScatterFaceAngle[currentloop] ) / 2.00 ) )



in case it might help, here are more lines
JASS:
      loop
   exitwhen currentloop > endofloop
    set udg_PinballScatterTempPoint = PolarProjectionBJ(GetUnitLoc(udg_PinballScatterProjectile[currentloop]), 30.00, udg_PinballScatterFaceAngle[currentloop])
    if ( Trig_Move_Pinballs_Func001Func005C() ) then
        set PinballScatterUnit = GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(48.00, udg_PinballScatterTempPoint, Condition(function Trig_Move_Pinballs_Func001Func005Func001002001003))) 
        call Trig_Move_Knockback(PinballScatterUnit, AngleBetweenPoints(udg_PinballScatterTempPoint, GetUnitLoc(PinballScatterUnit))
        set udg_PinballScatterFaceAngle[currentloop] = ( ( udg_PinballScatterFaceAngle[currentloop] + 180.00 ) + ( ( AngleBetweenPoints(GetUnitLoc(PinballScatterUnit)), udg_PinballScatterTempPoint) - udg_PinballScatterFaceAngle[currentloop] ) / 2.00 ) ) 
        set PinballScatterUnit = null
        else
    endif
    set currentloop = currentloop + 1
endloop


Wheres the error?

------
Solved.
 

Kenny

Back for now.
Reaction score
202
JASS:
set udg_PinballScatterFaceAngle[currentloop] = (( udg_PinballScatterFaceAngle[currentloop] + 180.00 ) + ( AngleBetweenPoints(GetUnitLoc(PinballScatterUnit),udg_PinballScatterTempPoint) - udg_PinballScatterFaceAngle[currentloop] ) / 2.00 )


Maybe try that. The line is long so im not sure its right. Im also not sure which values you wanted grouped together.
 

Tom Jones

N/A
Reaction score
437
The one marked with stars causes the syntax error.
JASS:

set udg_PinballScatterFaceAngle[currentloop] = ( ( udg_PinballScatterFaceAngle[currentloop] + 180.00 ) + ( ( AngleBetweenPoints(GetUnitLoc(PinballScatterUnit)*)*, udg_PinballScatterTempPoint) - udg_PinballScatterFaceAngle[currentloop] ) / 2.00 ) )
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Okay, those things you suggested didnt work
i deleted the whole line and it gives me the exact same error for the line that was right under (and that is now where the deleted line was)

what does that mean...

Edit:
I enabled normal world editor syntax checker, and it said the error was 2 lines above
I checked, and indeed there was a missing )

Could NewGen syntax checker be a little inaccurate with normal jass?
Or at least, at counting lines?
 

Kenny

Back for now.
Reaction score
202
JASS:
loop
   exitwhen currentloop > endofloop
    set udg_PinballScatterTempPoint = PolarProjectionBJ(GetUnitLoc(udg_PinballScatterProjectile[currentloop]), 30.00, udg_PinballScatterFaceAngle[currentloop])
    if ( Trig_Move_Pinballs_Func001Func005C() ) then
        set PinballScatterUnit = GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(48.00, udg_PinballScatterTempPoint, Condition(function Trig_Move_Pinballs_Func001Func005Func001002001003))) 
        call Trig_Move_Knockback(PinballScatterUnit, AngleBetweenPoints(udg_PinballScatterTempPoint, GetUnitLoc(PinballScatterUnit)))
        set udg_PinballScatterFaceAngle[currentloop] = ( ( udg_PinballScatterFaceAngle[currentloop] + 180.00 ) + ( ( AngleBetweenPoints(GetUnitLoc(PinballScatterUnit), udg_PinballScatterTempPoint) - udg_PinballScatterFaceAngle[currentloop] ) / 2.00 ) )
        set PinballScatterUnit = null
    endif
    set currentloop = currentloop + 1
endloop


There are many parenthesis missing or too many in one line, for most of your script. Try the above.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Try this:
JASS:
set udg_PinballScatterFaceAngle[currentloop] = ((udg_PinballScatterFaceAngle[currentloop] + 180) + ((AngleBetweenPoints(GetUnitLoc(PinballScatterUnit), udg_PinballScatterTempPoint)) - udg_PinballScatterFaceAngle[currentloop]) / 2.00)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top