JASS Saves, Then Goes To Main Screen

WolfieeifloW

WEHZ Helper
Reaction score
372
Spellbook And Switching Auras

This may be a little complicated..

I want a hero to have two auras, but only one able to be active at a time.
From my other thread I've learned I should probably use a spellbook to accomplish this.
I have two abilities based off Thunderclap, and then the actual two auras, making 4 spells in total (5 with the spellbook).
So my hero only has the first aura as one of his abilities.
The rest is triggers.

When he learns the aura (We'll use Command and Endurance) Command, I have a trigger like this (Haven't had time to convert this one to JASS yet)
Code:
FULearn
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Frost Presence (D)
    Actions
        Unit - Add Unholy Presence (D) to (Learning Hero)
        Player - Disable Unholy Presence (D) for (Owner of (Learning Hero))
        Player - Disable Unholy Presence  for (Owner of (Learning Hero))
        Unit - Add Spell Book  to (Learning Hero)
        Unit - Set level of Frost Presence  for (Learning Hero) to 1
        Player - Disable Spell Book  for (Owner of (Learning Hero))
So, it gives the spellbook to the hero, sets the levels of the aura to 1, and disables the other aura.
Now, my JASS trigger, is the one that actually makes the abilities switch (Or is supposed to):
JASS:
function F2U takes nothing returns nothing
    local integer l
    local unit t = GetTriggerUnit()
    local integer f = 'A000'
    local integer u = 'A001'
    local integer fd = 'A003'
    local integer ud = 'A002'
    
    set l = GetUnitAbilityLevel(t, fd)    
    //call UnitRemoveAbility(t, fd)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), fd, false)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), f, false)
    //call SetUnitAbilityLevel(t, f, 0)
    //call UnitAddAbility(t, ud)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), ud, true)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), u, true)
    call SetUnitAbilityLevel(t, ud, l)
    call SetUnitAbilityLevel(t, u, l)
endfunction

function Conditions takes nothing returns boolean
    if GetSpellAbilityId() == 'A003' then
        call F2U()
    //elseif GetSpellAbilityId() == 'A002' then
        //call U2F()
    endif
    return false
endfunction

function Presence takes nothing returns nothing
    local integer index = 0
    local trigger t = CreateTrigger()
    loop
        call TriggerRegisterPlayerUnitEvent(t, Player(index), EVENT_PLAYER_UNIT_SPELL_CAST, null)
        set index = index + 1
        exitwhen index == bj_MAX_PLAYER_SLOTS
    endloop
    call TriggerAddCondition(t, Condition(function Conditions))
endfunction

There's all the blanked out parts because I saw somewhere remove/add abilities doesn't work very well? If it does, let me know please!
But anyways, when any unit casts one of the Thunderclap dummies, it's supposed to disable the Thunderclap dummy for Command aura, then disable the actual Command Aura inside the spellbook. Then enable the Thunderclap dummy for Endurance, and enable to actual Endurance aura inside the spellbook, and set the level of both Endurance things to the level of the Command things.

So, anyone know what's wrong?
I am willing to send the map to anyone who will help me fix this!
 

Solmyr

Ultra Cool Member
Reaction score
30
You cannot use [ljass]GetTriggerUnit()[/ljass] within the global block. You need to use it within an event response.
JASS:
globals
    unit t
    integer f = 'A000'
    integer u = 'A001'
    integer fd = 'A003'
    integer ud = 'A002'
endglobals

function F2U takes nothing returns nothing
    local integer l
    set t = GetTriggerUnit()
    set l = GetUnitAbilityLevel(t, fd)    
    call UnitRemoveAbility(t, fd)
    call SetUnitAbilityLevel(t, f, 0)
    call UnitAddAbility(t, ud)
    call SetUnitAbilityLevel(t, ud, l)
    call SetUnitAbilityLevel(t, u, l)
endfunction

function U2F takes nothing returns nothing
    local integer l
    set t = GetTriggerUnit()
    set l = GetUnitAbilityLevel(t, ud)
    call UnitRemoveAbility(t, ud)
    call SetUnitAbilityLevel(t, u, 0)
    call UnitAddAbility(t, fd)
    call SetUnitAbilityLevel(t, fd, l)
    call SetUnitAbilityLevel(t, f, l)
endfunction

function Conditions takes nothing returns boolean
    if GetSpellAbilityId() == fd then
        call F2U()
    elseif GetSpellAbilityId() == ud then
        call U2F()
    endif
    return false
endfunction

function Presence takes nothing returns nothing
    local integer index = 0
    local trigger t = CreateTrigger()
    loop
        call TriggerRegisterPlayerUnitEvent(t, Player(index), EVENT_PLAYER_UNIT_SPELL_CAST, null)
        set index = index + 1
        exitwhen index == bj_MAX_PLAYER_SLOTS
    endloop
    call TriggerAddCondition(t, Condition(function Conditions))
endfunction
 

EspadaDelRey

New Member
Reaction score
3
You cannot use [ljass]GetTriggerUnit()[/ljass] within the global block. You need to use it within an event response.

He doesn't appear to be using a globals block. You are correct about [ljass]GetTriggerUnit()[/ljass] needs to be somewhere that it can work at. I don't remember using [ljass]GetTriggerUnit()[/ljass] wrongly in a way that resulted in anything but a failure of code to fire in-game.

Ok it took me a while but I think I get exactly what you were trying to do. You should perhaps use the takes feature.

JASS:
//function F2U takes nothing returns nothing//Replace this.
function F2U takes unit t returns nothing
//    local unit t = GetTriggerUnit()//Delete this line.
//...
//...
    if GetSpellAbilityId() == 'A003' then
//      call F2U()//Replace this.
        call F2U(GetTriggerUnit())
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Sorry, I should have said this, I used to be good at JASS but just getting back into it after a long time.
I'm going to need further explanation of adding actions to event response and that.

My spell now will setoff the cooldown, but won't change to the Endurance aura from Command.
I changed my trigger to this though, and it still doesn't fix it:
JASS:
//function F2U takes nothing returns nothing
function F2U takes unit triggerunit returns nothing
    local integer l
    local unit t = triggerunit
    local integer f = 'A000'
    local integer u = 'A001'
    local integer fd = 'A003'
    local integer ud = 'A002'
    
    set l = GetUnitAbilityLevel(t, fd)    
    //call UnitRemoveAbility(t, fd)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), fd, false)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), f, false)
    //call SetUnitAbilityLevel(t, f, 0)
    //call UnitAddAbility(t, ud)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), ud, true)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), u, true)
    call SetUnitAbilityLevel(t, ud, l)
    call SetUnitAbilityLevel(t, u, l)
endfunction

function Conditions takes nothing returns boolean
    if GetSpellAbilityId() == 'A003' then
        call F2U(GetTriggerUnit())
    //elseif GetSpellAbilityId() == 'A002' then
        //call U2F()
    endif
    return false
endfunction

function Presence takes nothing returns nothing
    local integer index = 0
    local trigger t = CreateTrigger()
    loop
        call TriggerRegisterPlayerUnitEvent(t, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
        set index = index + 1
        exitwhen index == bj_MAX_PLAYER_SLOTS
    endloop
    call TriggerAddCondition(t, Condition(function Conditions))
endfunction
 

EspadaDelRey

New Member
Reaction score
3
Sorry, I was confused. I edited my post while you were posting. I mentioned you should use takes. That will pass the unit. That's all you didn't do yet. But the other poster maybe tried to mention your Ability ID plan is odd. I don't think it would bug. So you can maybe ignore it for now.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I don't know how to change this to use 'takes'.
To me, it seems like this code should work perfectly..
Disable Command, enable Endurance.

I'm frustrated at myself I'm not getting this, lol.
Thank you for your help so far though!
 

EspadaDelRey

New Member
Reaction score
3
Ok, I see your point. You read the part where I said takes triggerunit. I edited that to say takes t. I could not remember your local variable name. You basically delete your local variable. It isn't needed.

EDIT: Yes, I see what you did with that local unit. That isn't needed. I don't think you should have much problem now. But, look at your naming. It is strange. t=trigger. t=unit. I think those are safe like that, but you might have clashing names somewhere else.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
JASS:
function F2U takes unit t returns nothing
    local integer l
    local integer f = 'A000'
    local integer u = 'A001'
    local integer fd = 'A003'
    local integer ud = 'A002'
    
    set l = GetUnitAbilityLevel(t, fd)    
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), fd, false)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), f, false)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), ud, true)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), u, true)
    call SetUnitAbilityLevel(t, ud, l)
    call SetUnitAbilityLevel(t, u, l)
endfunction

function Conditions takes nothing returns boolean
    if GetSpellAbilityId() == 'A003' then
        call F2U(GetTriggerUnit())
    endif
    return false
endfunction

function Presence takes nothing returns nothing
    local integer index = 0
    local trigger tr = CreateTrigger()
    loop
        call TriggerRegisterPlayerUnitEvent(tr, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
        set index = index + 1
        exitwhen index == bj_MAX_PLAYER_SLOTS
    endloop
    call TriggerAddCondition(tr, Condition(function Conditions))
endfunction

The spell still casts, but doesn't actually change to the other aura.
I think it might be something to do with this whole spellbook..
Is there any way that auras can be clicked so I don't need this spellbook..
 

WolfieeifloW

WEHZ Helper
Reaction score
372
No, that message does not show up at all..
I added a debug into my init too, and it doesn't even run that..

/E: So, I looked at one of my old maps I found, and saw scopes..
I added a scope, and it works now.

Do functions maybe have to be private without a scope or something?
 

Solmyr

Ultra Cool Member
Reaction score
30
... Okay, I think that the issue here is that you don't even have an initializer. Do this instead:
JASS:
scope myScope initializer Presence

function F2U takes unit triggerunit returns nothing
    local integer l
    local unit t = triggerunit
    local integer f = 'A000'
    local integer u = 'A001'
    local integer fd = 'A003'
    local integer ud = 'A002'
    
    set l = GetUnitAbilityLevel(t, fd)    
    //call UnitRemoveAbility(t, fd)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), fd, false)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), f, false)
    //call SetUnitAbilityLevel(t, f, 0)
    //call UnitAddAbility(t, ud)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), ud, true)
    call SetPlayerAbilityAvailable(GetOwningPlayer(t), u, true)
    call SetUnitAbilityLevel(t, ud, l)
    call SetUnitAbilityLevel(t, u, l)
endfunction

function Conditions takes nothing returns boolean
    if GetSpellAbilityId() == 'A003' then
        call F2U(GetTriggerUnit())
    //elseif GetSpellAbilityId() == 'A002' then
        //call U2F()
    endif
    return false
endfunction

function Presence takes nothing returns nothing
    local integer index = 0
    local trigger t = CreateTrigger()
    loop
        call TriggerRegisterPlayerUnitEvent(t, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
        set index = index + 1
        exitwhen index == bj_MAX_PLAYER_SLOTS
    endloop
    call TriggerAddCondition(t, Condition(function Conditions))
endfunction

endscope


EDIT: Yeah, apparently, you figured it out yourself 5 minutes ago.

He doesn't appear to be using a globals block. You are correct about [ljass]GetTriggerUnit()[/ljass] needs to be somewhere that it can work at. I don't remember using [ljass]GetTriggerUnit()[/ljass] wrongly in a way that resulted in anything but a failure of code to fire in-game.
He did have [ljass]GetTriggerUnit()[/ljass] up there, but updated his post and his code shortly after I posted. That's what was causing the map not to even load. As you can see, the problem now was different
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Well, it was working for switching Command to Endurance, or f -> u.
I tried to add u -> f (Endurance back to Command) and now it's broken again, just goes to the main screen.
JASS:
scope FUPresence initializer FUInit

    globals
        integer f = 'A000'
        integer u = 'A001'
        integer fd = 'A003'
        integer ud = 'A002'
    endglobals
    
    function F2U takes unit t returns nothing
        local integer l
        
        set l = GetUnitAbilityLevel(t, fd)    
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), fd, false)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), f, false)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), ud, true)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), u, true)
        call SetUnitAbilityLevel(t, ud, l)
        call SetUnitAbilityLevel(t, u, l)
    endfunction
    
    function U2F takes unit t returns nothing
        local integer l
        
        set l = GetUnitAbilityLevel(t, ud)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), ud, false)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), u, false)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), fd, true)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), f, true)
        call SetUnitAbilityLevel(t, fd, l)
        call SetUnitAbilityLevel(t, f, l)
    endfunction
        
    function Conditions takes nothing returns boolean
        if GetSpellAbilityId() == 'A003' then
            call F2U(GetTriggerUnit())
        elseif GetSpellAbilityId() == 'A002' then
            call U2F(GetTriggerUnit())
        endif
        return false
    endfunction
    
    function FUInit takes nothing returns nothing
        local integer index = 0
        local trigger tr = CreateTrigger()
        loop
            call TriggerRegisterPlayerUnitEvent(tr, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
            set index = index + 1
            exitwhen index == bj_MAX_PLAYER_SLOTS
        endloop
        call TriggerAddCondition(tr, Condition(function Conditions))
    endfunction

endscope


/EDIT: Maybe the 'l' integer is conflicting, let me change it.
Nope..

/EDIT2: When I save, it compiles fine, but when I use the 'Syntax Check' button, it brings up multiple (~50) errors.
I think I remember that button being broken though anyways?
 

Solmyr

Ultra Cool Member
Reaction score
30
/EDIT2: When I save, it compiles fine, but when I use the 'Syntax Check' button, it brings up multiple (~50) errors.
I think I remember that button being broken though anyways?
Of course it's broken. Just use JassHelper and PJass (those you get upon saving). I really don't see anything wrong with your code (assuming all your ability IDs are correct), besides the fact that it might go through some optimization.

JASS:
scope FUPresence initializer FUInit

    globals
        integer f = 'A000'
        integer u = 'A001'
        integer fd = 'A003'
        integer ud = 'A002'
    endglobals
    
    function F2U takes unit t returns nothing
        local integer l = GetUnitAbilityLevel(t, fd)
        local player p = GetTriggerPlayer()
        call SetPlayerAbilityAvailable(p, fd, false)
        call SetPlayerAbilityAvailable(p, f, false)
        call SetPlayerAbilityAvailable(p, ud, true)
        call SetPlayerAbilityAvailable(p, u, true)
        call SetUnitAbilityLevel(t, ud, l)
        call SetUnitAbilityLevel(t, u, l)
    endfunction
    
    function U2F takes unit t returns nothing
        local integer l = GetUnitAbilityLevel(t, ud)
        local player p = GetTriggerPlayer()
        call SetPlayerAbilityAvailable(p, ud, false)
        call SetPlayerAbilityAvailable(p, u, false)
        call SetPlayerAbilityAvailable(p, fd, true)
        call SetPlayerAbilityAvailable(p, f, true)
        call SetUnitAbilityLevel(t, fd, l)
        call SetUnitAbilityLevel(t, f, l)
    endfunction
        
    function Conditions takes nothing returns boolean
        if GetSpellAbilityId() == 'A003' then
            call F2U(GetTriggerUnit())
        elseif GetSpellAbilityId() == 'A002' then
            call U2F(GetTriggerUnit())
        endif
        return false
    endfunction
    
    function FUInit takes nothing returns nothing
        local integer index = 0
        local trigger tr = CreateTrigger()
        loop
            call TriggerRegisterPlayerUnitEvent(tr, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
            set index = index + 1
            exitwhen index == bj_MAX_PLAYER_SLOTS
        endloop
        call TriggerAddCondition(tr, Condition(function Conditions))
    endfunction

endscope

Also, do yourself a favor, and base those abilities on Fan of Knives (if you want them to be cast instantly) or on Howl/Roar/Battle Roar/Howl of Terror (if you want them to use your hero's cast point). Thunder Clap is quite bad.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
For some reason, my globals block is breaking it.
When I blanked out the globals and put them back into the functions, the map works..

Also, I think using [ljass]EVENT_PLAYER_UNIT_SPELL_EFFECT[/ljass] is making the conditions run when an ability gets enabled or something..
When I have U2F enabled, the game runes F2U, then also runs U2F.
When I comment out U2F, it still runs conditions twice, but obviously can't run U2F because it's not there..

Should I use _CAST?

JASS:
scope FUPresence initializer FUInit

    //globals
        //integer f = 'A000'
        //integer u = 'A001'
        //integer fd = 'A003'
        //integer ud = 'A002'
    //endglobals
    
    function F2U takes unit t returns nothing
        local integer l
        local integer f = 'A000'
        local integer u = 'A001'
        local integer fd = 'A003'
        local integer ud = 'A002'
        call BJDebugMsg("F2U running!")
        
        set l = GetUnitAbilityLevel(t, fd)    
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), fd, false)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), f, false)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), ud, true)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), u, true)
        call SetUnitAbilityLevel(t, ud, l)
        call SetUnitAbilityLevel(t, u, l)
    endfunction
    
    //function U2F takes unit t returns nothing
        //local integer ll
        //local integer fq = 'A000'
        //local integer uq = 'A001'
        //local integer fdq = 'A003'
        //local integer udq = 'A002'
        //call BJDebugMsg("U2F running!")
        
        //set ll = GetUnitAbilityLevel(t, udq)
        //call SetPlayerAbilityAvailable(GetOwningPlayer(t), udq, false)
        //call SetPlayerAbilityAvailable(GetOwningPlayer(t), uq, false)
        //call SetPlayerAbilityAvailable(GetOwningPlayer(t), fdq, true)
        //call SetPlayerAbilityAvailable(GetOwningPlayer(t), fq, true)
        //call SetUnitAbilityLevel(t, fdq, ll)
        //call SetUnitAbilityLevel(t, fq, ll)
    //endfunction
    
    function Conditions takes nothing returns boolean
        call BJDebugMsg("Running C!")
        if GetSpellAbilityId() == 'A003' then
            call BJDebugMsg("F2U!")
            call F2U(GetTriggerUnit())
        //elseif GetSpellAbilityId() == 'A002' then
            //call BJDebugMsg("U2F!")
            //call U2F(GetTriggerUnit())
        endif
        return false
    endfunction
    
    function FUInit takes nothing returns nothing
        local integer index = 0
        local trigger tr = CreateTrigger()
        call BJDebugMsg("Init!")
        loop
            //call TriggerRegisterPlayerUnitEvent(tr, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
            call TriggerRegisterPlayerUnitEvent(tr, Player(index), EVENT_PLAYER_UNIT_SPELL_CAST, null)
            set index = index + 1
            exitwhen index == bj_MAX_PLAYER_SLOTS
        endloop
        call BJDebugMsg("Loop finished!")
        call TriggerAddCondition(tr, Condition(function Conditions))
    endfunction

endscope

It goes:
Running C!
F2U!
F2U running!
Running C!
I don't want it to run the conditions again..
After it changes the skill, it's supposed to stop..

/EDIT: Wait a second..
Even if I use Endurance (A002), it still runs F2U, when F2U should only run when it's A003..
Does enabling/disabling abilities not switch their ID's or something?
Should I go back to add/remove?
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Sorry for double post, just thought I'd give the working trigger here.
Apparently removing abilities inside a spellbook doesn't work too well, as you need a second spellbook to do that or something.
I just disabled/enabled the abilities in the spellbook, and added/removed the actual dummy ability.
JASS:
scope FUPresence initializer FUInit

    //globals
        //integer f = 'A000'
        //integer u = 'A001'
        //integer fd = 'A003'
        //integer ud = 'A002'
    //endglobals
    
    function F2U takes unit t returns boolean
        local integer l
        local integer f = 'A000'
        local integer u = 'A001'
        local integer fd = 'A003'
        local integer ud = 'A002'
        call BJDebugMsg("F2U running!")
        
        set l = GetUnitAbilityLevel(t, fd)    
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), f, false)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), u, true)
        call UnitRemoveAbility(t, fd)
        call UnitAddAbility(t, ud)
        call SetUnitAbilityLevel(t, ud, l)
        call SetUnitAbilityLevel(t, u, l)
        return false
    endfunction
    
    function U2F takes unit t returns nothing
        local integer l
        local integer f = 'A000'
        local integer u = 'A001'
        local integer fd = 'A003'
        local integer ud = 'A002'
        call BJDebugMsg("U2F running!")
        
        set l = GetUnitAbilityLevel(t, ud)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), u, false)
        call SetPlayerAbilityAvailable(GetOwningPlayer(t), f, true)
        call UnitRemoveAbility(t, ud)
        call UnitAddAbility(t, fd)
        call SetUnitAbilityLevel(t, fd, l)
        call SetUnitAbilityLevel(t, f, l)
    endfunction
    
    function Conditions takes nothing returns boolean
        call BJDebugMsg("Running C!")
        if GetSpellAbilityId() == 'A003' then
            call BJDebugMsg("F2U!")
            call F2U(GetTriggerUnit())
        elseif GetSpellAbilityId() == 'A002' then
            call BJDebugMsg("U2F!")
            call U2F(GetTriggerUnit())
        endif
        return false
    endfunction
    
    function FUInit takes nothing returns nothing
        local integer index = 0
        local trigger tr = CreateTrigger()
        call BJDebugMsg("Init!")
        loop
            call TriggerRegisterPlayerUnitEvent(tr, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
            //call TriggerRegisterPlayerUnitEvent(tr, Player(index), EVENT_PLAYER_UNIT_SPELL_CAST, null)
            set index = index + 1
            exitwhen index == bj_MAX_PLAYER_SLOTS
        endloop
        call BJDebugMsg("Loop finished!")
        call TriggerAddCondition(tr, Condition(function Conditions))
    endfunction

endscope

However, whenever I try to use the globals block, it breaks the map and makes WC3 go to the main screen.

Anyone know why?
Global blocks are quite nice to use, would like to be able to lol.

Also, what are the abilities that are instant-cast and don't interrupt movement (That would work for this kind of thing), I know there was a few.
 

EspadaDelRey

New Member
Reaction score
3
JASS:
scope FUPresence initializer FUInit

    globals        
        private integer f = 'A000'
        private integer u = 'A001'
        private integer fd = 'A003'
        private integer ud = 'A002'


If you have any variables with the same names then you get errors. Use private variables if you're going to use names of variables that you would use for other variables, even if the other variables were locals.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top