Page 1 of 1

Unresponsive MACRO call.

Posted: Wed May 28, 2014 11:43 am
by nirkedar
Can someone figure out why after running the red line, the code never comes back to the next (green) line.

[H: macroName = ARG(0)]
[H, IF(argCount()>1) : macroParams = ARG(1); macroParams = ""]
[H, IF(argCount()>2) : dataToken = ARG(2); dataToken = ""]

[H: macroLibName = substring(macroName, indexOf(macroName, "@")+1, length(macroName))]
[H: macroName = substring(macroName, 0, indexOf(macroName, "@"))]
[H: Result = ""]

[H, IF(NOTNULL(macroLibName)): macroExists = hasMacro(macroName, macroLibName); macroExists=0]

[H, IF(macroExists), CODE: {
[H, IF(ISNULL(dataToken)): dataToken = getName()]
[H, IF(startsWith(dataToken, "LIB:")==0): dataToken = "LIB": + dataToken]
[H: macroName = macroName + "@" + macroLibName]
[H: switchToken(dataToken)]
[H, MACRO(macroName): macroParams]
[H: Result = macro.return]
}]

[H: macro.return = Result]

Re: Unresponsive MACRO call.

Posted: Wed May 28, 2014 4:17 pm
by wolph42
Probly cause it renders an error. But without that code (of macroname) it's hard to tell.