If you use a variable name that begins with "true", you will encounter failures or odd behavior.
Simple code sample:
Code: Select all
[ trueseeing = "asdf" ]
Code: Select all
Unknown node type: name=true, type=31
Sample Code: (this can be put into a Global macro and does not need a token to run)
Code: Select all
[H: sensesFixed = '["arcane sight","keen scent","lifesense","low-light vision","scent","see in darkness","see invisibility","snow vision","spiritsense","seeing - true","tr seeing","true seeing","unknown"]' ]
[H: inSenses = "tab01 | Senses | | TAB" ]
[H: inStringSensesFixed = "%{senseFv}|0|%{senseF}|CHECK|" ]
[H, FOREACH( senseF, sensesFixed ), CODE: {
[ senseFv = replace(senseF, "[^a-zA-Z]", "") ]
[ inSenses = listAppend( inSenses, strformat( inStringSensesFixed ), "##" ) ]
}]
[H: cancel = input(
inSenses
)]
[H: abort(cancel)]
[H: wSensesFixedJ = '[]' ]
[H, FOREACH( senseF, sensesFixed ), CODE: {
[H: senseFv = replace(senseF, "[^a-zA-Z]", "") ]
[ senseValue = eval(senseFv+"")]
[IF(senseValue > 0): wSensesFixedJ = json.append( wSensesFixedJ, senseF ); "" ]
}]
[R: wSensesFixedJ ]
Yes, I lost a LOT of hair with this one...