maptool icon indicating copy to clipboard operation
maptool copied to clipboard

[Bug]: getCurrentMapName() crashes when calling as a player on a map not visible for players

Open Lector opened this issue 1 year ago • 0 comments

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

  1. Start maptools-server as a GM
  2. Connect to maptools-server as a player
  3. As a GM create a new map visible to players.
  4. As a Player switch to this map
  5. As a GM hide this map from players
  6. 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

Lector avatar Sep 02 '22 02:09 Lector