• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Weird save error

Status
Not open for further replies.
Level 4
Joined
Nov 27, 2012
Messages
85
When I save, I get 3 compile errors:

JASS:
// Trigger: Blizzard
//===========================================================================
//TESH.scrollpos=0
//TESH.alwaysfold=0 <----- Line 13845: Expected end of line
globals
    integer privintg <----- Line 13847: Expected end of line  (This one actually gives 2 errors)
endglobals

function Trig_Blizzard_Conditions takes nothing returns boolean
    return GetSpellAbilityId()=='DaoF'
endfunction

function Trig_Blizzard_Actions takes nothing returns nothing
    set udg_unit_blizzard=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h01U',GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),bj_UNIT_FACING)
    call UnitAddAbility(udg_unit_blizzard,'FMba')
endfunction

function Trig_Blizzard_End_Actions takes nothing returns nothing
    call RemoveUnit(udg_unit_blizzard)
    set udg_unit_blizzard=null
endfunction
//===========================================================================
function InitTrig_Blizzard takes nothing returns nothing
    local integer i=0
    local trigger t=CreateTrigger()
    set gg_trg_Blizzard=CreateTrigger()

    loop
        exitwhen i==bj_MAX_PLAYER_SLOTS
        call TriggerRegisterPlayerUnitEvent(gg_trg_Blizzard,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
        call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
        set i=i+1
    endloop
    call TriggerAddCondition(gg_trg_Blizzard,Condition(function Trig_Blizzard_Conditions))
    call TriggerAddAction(gg_trg_Blizzard,function Trig_Blizzard_Actions)
    call TriggerAddCondition(t,Condition(function Trig_Blizzard_Conditions))
    call TriggerAddAction(t,function Trig_Blizzard_End_Actions)

    set t=null
endfunction

Now the weird part is, I don't even have a Blizzard trigger. I entered the globals in when I was trying to get Newgen working, and then deleted it later.
I open it up in standard WE, save, got this error, so I deleted the entire trigger, and I still get this error. :vw_wtf:

I opened the map up in MPQEditor, I'm not quite sure if this is normal, but there is 2 war3map.j files.
One in the standard folder, and another in "Scripts"

I check the standard j file, and the lines causing the errors aren't in it, I check the j file in the scripts folder, those lines ARE in it, so I delete that file in the MPQEditor, re-open the map in WE, don't touch anything, save and still get this error.

I also tried making a new Blizzard trigger, 1st with nothing in it, and 2nd with the above code minus the TESH and globals
 
Level 4
Joined
Nov 27, 2012
Messages
85
Thanks, but turns out I must have messed things up real bad when I was setting up Newgen. I couldn't even play games on Bnet

So I re-installed, fixed.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
deathismyfriend is right about the globals, they are just unsercure to use. However, noone noticed he uses JNGP? normal WE doesnt generate //TESH.scrollpos=0 etc

also, the problem is most likely with the trigger above, it can be missing endmethod, endstruct, endmodule, endfunction or something like that

edit:

you can make the privintg actually private, just wrap the code to scope endscope and mark the variable with private(private integer privintg)
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
he said hes getting the error in normal WE because JNGP made globals which made normal WE mad. U cant just make globals in JNGP than go back and use them in normal WE... doesnt work that way
 
Status
Not open for further replies.
Top