[Solved] WE script errors on the latest patch

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2013
Messages
1,105
Have not done anything on the latest patch, coded some stuff in notepad, pasted it over.
It passes the JASSHelper check fine, but then I get 20+ unknown compiler errors, and 20+ symbol not declared. Haven't really used the latest editor at all so is there a setting I have fouled up?

JASS:
library Space initializer init

        globals
     
        private unit array u// caster array
        private effect array e
        private real array d // duration array
        private integer index = 0
        private constant real TIMEOUT = .03125
        private constant timer t = CreateTimer()
        private constant integer THUNDER_ROCKET = '0000' //
        private constant real DURATION = 5.
        private constant string EFFECT = "Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl"
        private constant real OFFSET = 200.
     
        endglobals

function ThunderRocket takes nothing returns boolean
    local real angle
    local real angle2
    local real x = 0
    local real y = 0
    if GetSpellAbilityId() == THUNDER_ROCKET then
        set u[index] = GetTriggerUnit()
        set d[index] = DURATION
        set angle = GetUnitFacing(u[index])
        set x = GetUnitX(u[index])
        set y = GetUnitY(u[index])
        set angle2 = OFFSET * Cos(angle)
        set x = x + angle2
        set angle = OFFSET * Sin(angle)
        set y = y + angle2
     
  
        set e[index] = AddSpecialEffect(EFFECT, x,y)
    endif
    return false


endfunction

private function init takes nothing returns nothing
    local trigger t10 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( t10, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( t10, Condition(function ThunderRocket))
endfunction

endlibrary
Error Pic.png
 
Last edited:
Level 45
Joined
Feb 27, 2007
Messages
5,578
Unlikely to be this but as a note: handle type variables should not be declared constant. (Remove that keyword from timer t.)

I don't get any errors trying to save the same code in the most recent non-ptr WE, so best guess is that you have a hidden character on one of the lines that is causing the compiler to go wonky. Try commenting out as much of it as you can and then selectively enabling lines until you find the one causing it. Then fully delete and rewrite the line (no copy/paste).
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
So I went ahead and created a new trigger, and manually typed it all into it. Still got the 50+ compile errors.

I then went back and commented everything out line by line, and even with the entire trigger commented I got this compile error.
Error Pic 2.png


EDIT:

I seem to have found the solution, although it technically is a problem.

In the trigger editor menu under JassHelper I had "Enable vJass" toggled on because I was using vJass. I turned it and left it off, and now I am able to save, load, and run without issues despite still using vJass.

Bizarre, but probably just a kink with the current state of the editor.
 
Last edited:
Status
Not open for further replies.
Top