You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the wiki did not show how to use a non default delimiter with varsFromStrProp. In testing I found that while you can use a custom delimiter with it, there are some issues. A delim parameter can be used as the second parameter. Or as a third parameter if you use "UNSUFFIXED" as the second (decor) parameter. It can not be used with the "SUFFIXED" or "NONE" decor parameters.
Forther, there does not seem to be a way to use "SUFFIXED" at all.
To Reproduce
Using the structure of the example on the wiki and changing the default delim from a semicolon to a comma:
Describe the Bug
I found that the wiki did not show how to use a non default delimiter with varsFromStrProp. In testing I found that while you can use a custom delimiter with it, there are some issues. A delim parameter can be used as the second parameter. Or as a third parameter if you use "UNSUFFIXED" as the second (decor) parameter. It can not be used with the "SUFFIXED" or "NONE" decor parameters.
Forther, there does not seem to be a way to use "SUFFIXED" at all.
To Reproduce
Using the structure of the example on the wiki and changing the default delim from a semicolon to a comma:
Works:
[h: varsFromStrProp("a=blah, b=doh, c=meh", ",")]
[r: a] [r: b] [r: c]
[h: varsFromStrProp("a=blah, b=doh, c=meh", "UNSUFFIXED", ",")]
[r: a] [r: b] [r: c]
Does not work:
[h: varsFromStrProp("a=blah, b=doh, c=meh", "SUFFIXED", ",")]
[r: a] [r: b] [r: c]
[h: varsFromStrProp("a=blah, b=doh, c=meh", "NONE", ",")]
[r: a] [r: b] [r: c]
Using the default semicolon delimiter:
Works:
[h: varsFromStrProp("a=blah; b=doh; c=meh", "UNSUFFIXED")]
[r: a] [r: b] [r: c]
Does not work:
[h: varsFromStrProp("a=blah; b=doh; c=meh", "SUFFIXED")]
[r: a] [r: b] [r: c]
[h: varsFromStrProp("a=blah; b=doh; c=meh", "NONE")]
[r: a] [r: b] [r: c]
This:
[h: varsFromStrProp("a=blah, b=doh, c=meh", "", ",")]
Produces this error:
varsFromStrProp called with 3 arguments, but second argument "" was not one of NONE, SUFFIXED, or UNSUFFIXED.
Expected Behaviour
Custom delim parameter should be in a fixed location, presumably the third given that decor is the second.
A blank second parameter should be default (NONE/UNSUFFIXED) and not throw an error.
SUFFIXED should work as a parameter.
Screenshots
No response
MapTool Info
1.5.2
Desktop
Window 11
Additional Context
No response
The text was updated successfully, but these errors were encountered: