MapID help

Help.png
help2.png
 

Hello, I'm quite new to this and I'm trying to make "tpback" into the map ID in the common event. I've been having trouble with it, could someone please tell me how to make "tpback have the map ID? I'm doing a system where you can teleport to a shop and then teleport back from where you came from.
You misunderstood the get location info command - that command is NOT needed for your teleport idea (and can't get the info you need anyway).

Use control variable command, and set the variable to game data:Map ID if you want to get the current map ID
Thank you very much, but now the X/Y co ords make him to go the top left of the screen even though I got those co ordinates as a variable but they don't work, any possible tips?
Show us screenshots of the events - either you stored the wrong data, or something overwrote the data (other events, scripts)

Original thread: https://forums.rpgmakerweb.com/threads/mapid-help.39874/