Chaosy
Tutorial Reviewer
- Joined
- Jun 9, 2011
- Messages
- 13,239
I was thinking of adding Table as an optional lib for one of my systems.
However I don't quite get how to make it work.
I can use
But I want to declare a Table variable inside my struct which seems impossible with my limited knowledge.
However I don't quite get how to make it work.
I can use
JASS:
static if(LIBRARY_Table)
{
//do something table related
}
But I want to declare a Table variable inside my struct which seems impossible with my limited knowledge.
JASS:
//! zinc
library x requires optional Table
{
struct y
{
Table t; //<<<<
static method create() -> thistype
{
thistype this = thistype.allocate();
static if(LIBRARY_Table)
{
//do something table related
}
return this;
}
}
}
//! endzinc