Cannot stock game_map.map_id into a variable

My problem is the following : I have two events stocking game_map.map_id into variable #4 - when trying to display it, it just shows me an empty array and I don't know why.

Does anyone know the cause/fix for this ?
Moved to: VX Ace Support

If they have arrays, then you are doing something weird when you change the variables. Show us the two events. Why do you have two events doing it? And show us the event where you are trying to display it.

Do you have any added scripts? Do any of them use variable 4 for anything? Do you use variable 4 for anything else?
additionally, why use the script at all? the current map ID is one of the options in control variable - the default for game data actually.
I also note that you said game_map and not $game_map. If you've missed out the dollar sign, that won't work regardless.

Original thread: https://forums.rpgmakerweb.com/threads/cannot-stock-game_map-map_id-into-a-variable.137498/