How can I control in which order libraries are placed in the script?

Builder Bob

Live free or don't
Reaction score
249
When I have multiple libraries and want one library to call a function from another library, how do I make sure the right library is above the other in the script?
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
Importing before the other one maybe.

Or maybe it will detect the function call and make it requires the other one.
 

Builder Bob

Live free or don't
Reaction score
249
It didn't detect the function call. It just gave me a syntax error. I can try to export the library and import it again. However, that's a solution with a few drawbacks. All other triggers that uses the library will lose their references and I will have to fix them.
 

SerraAvenger

Cuz I can
Reaction score
234
make sure to import them in the right order and always set the library ids correctly.

Not using library ids is also what would break your other code.

Lesson learned:
Always use library ids.
 

Builder Bob

Live free or don't
Reaction score
249
make sure to import them in the right order and always set the library ids correctly.

Not using library ids is also what would break your other code.

Lesson learned:
Always use library ids.

I can't believe we have to import libraries in a specific order and not be able to swap them around afterwards... I'll try out the id's and see what they can do for me. Aren't id's only necessary for when [something] share the same name? Yeah, I haven't really looked into it.
 

SerraAvenger

Cuz I can
Reaction score
234
I can't believe we have to import libraries in a specific order and not be able to swap them around afterwards... I'll try out the id's and see what they can do for me. Aren't id's only necessary for when [something] share the same name? Yeah, I haven't really looked into it.

ids are necessary whenever you want to move the library from one map into another.
You should only have to import them in a specific temporal order, the placement within the script should not be important.
 

Builder Bob

Live free or don't
Reaction score
249
You should only have to import them in a specific temporal order, the placement within the script should not be important.

I can't see why it was made this way. It's really annoying that I have to import things in one specific order, and not be able to swap things around whenever I see fit.

This thing was the same way in warcraft 3 before clever minds fixed it (A library could require other libraries), as well as so many other issues. It just amazes me how the same annoyances are seen again and again...
 

SerraAvenger

Cuz I can
Reaction score
234
I can't see why it was made this way. It's really annoying that I have to import things in one specific order, and not be able to swap things around whenever I see fit.

This thing was the same way in warcraft 3 before clever minds fixed it (A library could require other libraries), as well as so many other issues. It just amazes me how the same annoyances are seen again and again...

I can.
1. It was easy for Blizzard, eg, cheap to do.
2. Blizzard doesn't use that kind of functionality, so they don't need it.

Btw, it was not the same way with Wc3.
 

SerraAvenger

Cuz I can
Reaction score
234
How was it different?

In Wc3, the import order was insignificant (I'm not sure it is anymore); You didn't have to specify and load a unique "library id"

On the other hand, your code was not usable from within GUI.

The usability from within GUI requires the unique library ids.
 

Builder Bob

Live free or don't
Reaction score
249
Ok, I don't remember anymore as I never really used the GUI.

Anyways, seeing as we can't control the sequence functions are written within the script in GUI I'll just accept that I will have to move away from GUI some time soon.
 
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