JRPG battle return to map?

so i am making a turn based jrpg. i have main map to battle map working but, how do i return to where i left off on my main map?

Save the location to a file using SaveGame or to a persistent GameInstance variable.

Check out this thread.