maptool
maptool copied to clipboard
[Bug]: getAllPropertyNames error on type not present
Describe the Bug
getAllPropertyNames(type, delim) creates an error causing macros to stop running where the type does not exist in the Camapaign Properties.
To Reproduce
- Copy the following ->
[r: getAllPropertyNames("Franco_Prussian_Soldier_Specialist_Artillerest_16thCentury", "json")]
- Paste into chat, press Enter.
- Read the error message.
Expected Behaviour
I would expect it to return an empty set or false. Without being able to determine what token types exist within the campaign there is no way to know if the function is safe to call. Accordingly I would expect it to return something useful that can be handled in code if the type is not present.
Screenshots
No response
MapTool Info
1.11.4
Desktop
Win10
Additional Context
No response
It is not clear to me if this should be closed from #3548 #4697 could also mitigate the issue (by checking first)
Haven't tested it but it appears closable.