- Joined
- Sep 8, 2007
- Messages
- 994
Hello folks,
as stated in the thread's name I keep getting the error "Not a valid identifier name". Can't figure out what's wrong here, but since this is my first time using textmacros, I guess I maybe just did a common mistake. Here's the code:
I know, I just easily could copy-paste the method and change the values manually, but hey, why not making use of something advanced if you could!
Help's appreciated.
as stated in the thread's name I keep getting the error "Not a valid identifier name". Can't figure out what's wrong here, but since this is my first time using textmacros, I guess I maybe just did a common mistake. Here's the code:
JASS:
//!textmacro SpecList takes NAME, KEY
public method $NAME$ takes integer $KEY$ returns thistype
local Element temp = .head
local Element copy
local thistype newLL = thistype.create()
if .head == 0 then
return newLL
endif
while temp.getNext() != 0
if temp.get$KEY$() == $KEY$ then
call newLL.addElement(temp.copyElement())
endif
set temp = temp.getNext()
endwhile
return newLL
endmethod
//!endtextmacro
//!runtextmacro SpecList("createSpecParentList", "ParentID")
//!runtextmacro SpecList("createSpecAbilityList", "AbilityID")
I know, I just easily could copy-paste the method and change the values manually, but hey, why not making use of something advanced if you could!
Help's appreciated.
Last edited by a moderator: