Hi,
So I have a strange issue.
I have been working on a map with lots of custom code and units. Until recently everything was fine-ish. Recently, I have run into an issue that is bothering me.
The issue:
Everytime I try to save the map, I get a host of JASS errors. I have traced these errors to a function (that is autogenerated) that is creating an 'empty' trigger and calling its initialization right after the default Melee_Initilization trigger in the InitCustomTriggers function of war3map.j.
This error is preventing the map running.
This is, to my knowledge, the part of the code where things start breaking down:
A few key notes:
* the global trigger variable gg_trg_ is not in the globals section of the script.
* I have manually gone into the script and tried the following:
- Manually remove the function call to InitTrig( ) as well as remove the whole InitTrig_ function and its action function. Doing this and injecting the new (edited) war3map.j into the map file allows me to run the map, but as soon as I change something and try to save the map, the bad code reappears!
This leads me to believe that something, somewhere is autogenerating this bad code.
I have even tried to manually add gg_trg_ as a global trigger variable in the global definitions at the top of the map.j file. But that section gets re-written when I save the map. Bringing me back to square one.
Since the problem seems to be one where something is autogenerating this bad trigger (empty trigger by the looks of it since its just gg_trg_ with no name), I tried again after disabling all my triggers except for the melee init (which doesn't do anything on my map).
Even after this, the problem persists, something is creating this random empty trigger, not adding it to the globals and forcing it to be called during the inits of all custom triggers.
I was wondering if anyone had come across a problem like this before, one where empty triggers are being generated from nowhere. If so, how did you solve it?
A quick turnaround would be helpful, I will be watching this thread in case you need more info.
As a side note, I am not using any custom spell/trigger system. Everything is base Jass. Nothing fancy
Thanks for the help.
So I have a strange issue.
I have been working on a map with lots of custom code and units. Until recently everything was fine-ish. Recently, I have run into an issue that is bothering me.
The issue:
Everytime I try to save the map, I get a host of JASS errors. I have traced these errors to a function (that is autogenerated) that is creating an 'empty' trigger and calling its initialization right after the default Melee_Initilization trigger in the InitCustomTriggers function of war3map.j.
This error is preventing the map running.
This is, to my knowledge, the part of the code where things start breaking down:
JASS:
==============
// Trigger:
//
================================
==============
function Trig__Actions takes nothing returns nothing
endfuntion
//
================================
==============
function InitTrig_ takes nothing returns nothing // *NB* this is the bad function, it is being autogenerated
set gg_trg_ = CreateTrigger( ) // the function is trying to create a trigger and assign it to gg_trg_, but gg_trg_ doesn't exist!
call TriggerAddAction( gg_trg_, function Trig__Actions )
endfunction
//
=================================
==============
function InitCustomTriggers takes nothing returns nothing
... a whole bunch of valid triggers then right near the end of this function we see...
call InitTrig_Melee_Initialization( )
call InitTrig_( ) //*NB* This is where the faulty trig is being called
endfunction
A few key notes:
* the global trigger variable gg_trg_ is not in the globals section of the script.
* I have manually gone into the script and tried the following:
- Manually remove the function call to InitTrig( ) as well as remove the whole InitTrig_ function and its action function. Doing this and injecting the new (edited) war3map.j into the map file allows me to run the map, but as soon as I change something and try to save the map, the bad code reappears!
This leads me to believe that something, somewhere is autogenerating this bad code.
I have even tried to manually add gg_trg_ as a global trigger variable in the global definitions at the top of the map.j file. But that section gets re-written when I save the map. Bringing me back to square one.
Since the problem seems to be one where something is autogenerating this bad trigger (empty trigger by the looks of it since its just gg_trg_ with no name), I tried again after disabling all my triggers except for the melee init (which doesn't do anything on my map).
Even after this, the problem persists, something is creating this random empty trigger, not adding it to the globals and forcing it to be called during the inits of all custom triggers.
I was wondering if anyone had come across a problem like this before, one where empty triggers are being generated from nowhere. If so, how did you solve it?
A quick turnaround would be helpful, I will be watching this thread in case you need more info.
As a side note, I am not using any custom spell/trigger system. Everything is base Jass. Nothing fancy
Thanks for the help.