- Joined
- Jun 30, 2008
- Messages
- 580
JASS:
struct attribute
choice array choices[MAX_CHOICES]
string name
integer max_choice
static method RegisterChoice takes choice c returns nothing
set .max_choice = .max_choice + 1
set .choices[.max_choice] = c
endmethod
static method create takes string name returns attribute
local attribute r = attribute.allocate()
set r.name = name
return attribute
endmethod
endstruct
struct choice
string cname
//! textmacro SetType takes TYPE
$TYPE$ data
static method create takes string name, $TYPE$ a returns choice
local choice r = choice.allocate()
set .cname = name
set .data = a
return choice
endmethod
//! endtextmacro
endstruct
//! runtextmacro SetType("string")
function tempint takes nothing returns nothing
local attribute r = attribute.create("Hair Color")
call r.RegisterChoice(choice.create("Black", ""))
endfunction
I keep getting the error: Constructor requires no arguments
Any Ideas why? Keep in mind this is the first time ever messing with textmacros.