- Joined
- Aug 4, 2006
- Messages
- 357
Hey guys I need some vJass experts to help me out here. I am stumped. So, basically I have the following code in one trigger:
and I have another library that I want to be able to use different types of "Pair"s:
However when I save the map, I get compile errors saying that it can't find the RealPair allocate function. For some reason, it creates the IntegerPair allocate/destroy functions before the twoPairs allocate/destroy functions before the RealPair allocate/destroy functions. It's completely ignoring the requirements of the libraries and just placing the struct allocate functions in random order. See the attached screenshot.
JASS:
library test
//! textmacro Pair takes type, listType
struct $listType$Pair
$type$ a
$type$ b
endstruct
//! endtextmacro
//! runtextmacro Pair("integer", "Integer")
//! runtextmacro Pair("real", "Real")
endlibrary
JASS:
library test2 requires test
struct twoPairs
private IntegerPair p1 = IntegerPair.create()
private RealPair p2 = RealPair.create()
endstruct
endlibrary