Layer condition of getTokens() and getTokenNames() not accepting string #1204
Labels
bug
macro changes
This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor)
tested
This issue has been QA tested by someone other than the developer.
Describe the bug
Using a string for the value of the layer condition to
getTokens()
andgetTokenNames()
results in an Illegal Argument Exception.To Reproduce
Steps to reproduce the behavior:
[h: conditions = json.set("{}", "visible", 1, "layer", "token")]
[h: tokenList = getTokenNames(",", conditions)]
java.lang.IllegalArgumentException: No enum constant net.rptools.maptool.model.Zone.Layer."TOKEN" error executing expression tokenList = getTokenNames(",", conditions).
Expected behavior
Passing a string with a single layer name should be supported per Wiki documentation.
http://www.lmwcs.com/rptools/wiki/getTokens
MapTool Info
Desktop (please complete the following information):
Additional context
Reported on Discord.
Workaround
Passing a JSON Array containing the layer(s) for the condition works as expected.
The text was updated successfully, but these errors were encountered: