maptool
maptool copied to clipboard
[Bug]: getCurrentMapName() crashes when calling as a player on a map not visible for players
Describe the Bug
When the GM hides a map with players on it the function getCurrentMapName() crashes when players are still on this map.
To Reproduce
- Start maptools-server as a GM
- Connect to maptools-server as a player
- As a GM create a new map visible to players.
- As a Player switch to this map
- As a GM hide this map from players
- As a Player call a macro that uses getCurrentMapName(). That macro will crash and print the following to the player only: "getCurrentMapName: Function needs a current Map but none is available."
Expected Behaviour
I would like getCurrentMapName() to return the name of the invisible map. OR i would like it to return "".
Screenshots
No response
MapTool Info
Version: 1.11.5
Desktop
No response
Additional Context
No response