Calling a library funtion from another lib

GooS

Azrael
Reaction score
154
Hey,

Got some problems when I attempted to call a library function from another library. All it says is "Undefined function", so is this possible?
Perhaps with some syntax I'm not familiar with.

Could do the same thing easily in another way but it's still a question I would like to have the answer to.

//==GooS
 

Romek

Super Moderator
Reaction score
963
Libraries are moved to the top of the map script in alphabetical order, unless you use the [ljass]needs[/ljass] keyword (or other variants) to ensure the library moves below the other library.

You can only call functions that are above the place you're calling from, otherwise you'll get the error you're getting.

JASS:
library A needs B // This ensures that 'B' is above 'A', despite 'A' being first alphabetically.

   // Within Function
       call B_Function()

endlibrary

library B

   public function Function takes nothing returns nothing
   endfunction

endlibrary
 

GooS

Azrael
Reaction score
154
The more you know!

Thanks alot Romek, that clears some things up.

//==GooS
 
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