Unresponsive MACRO call.

Progress reports and musings from the developers on the current gaming tools.

Moderators: dorpond, trevor, Azhrei

Post Reply
nirkedar
Cave Troll
Posts: 52
Joined: Tue Sep 21, 2010 3:13 pm

Unresponsive MACRO call.

Post 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]


Post Reply

Return to “Developer Notes”