- Joined
- Mar 18, 2012
- Messages
- 1,716
Quick question:
Can a module only be implemented once per struct?
If I comment one of those methods out it will compile, otherwise JassHelper throws an error. undeclared variable x, x1, y, y1
Edit: I've never used textmacros, but is it possible to do what I try to achieve here with //! runtextmacro?
Something like:
Can a module only be implemented once per struct?
JASS:
library xxxx
module IPMStart
local integer i = 1
local real x = 0
local integer y = 0
local integer y1 = 0
local real x1 = 0
local integer number = 0
endmodule
struct yxyx extends array
private static method plus takes nothing returns boolean
implement IPMStart
set x1 = x + 1.
set y1 = y + 1
return false
endmethod
private static method minus takes nothing returns boolean
implement IPMStart
set x1 = x - 1.
set y1 = y - 1
return false
endmethod
endstruct
endlibrary
If I comment one of those methods out it will compile, otherwise JassHelper throws an error. undeclared variable x, x1, y, y1
Edit: I've never used textmacros, but is it possible to do what I try to achieve here with //! runtextmacro?
Something like:
JASS:
//! textmacro my_Variables
local integer i = 1
local real x = 0
local integer y = 0
local integer y1 = 0
local real x1 = 0
local integer number = 0
//! endtextmacro