Quantcast

Fix an error when navigating the world map

James Whitehead II [11-24-10 - 16:10]
Fix an error when navigating the world map
Filename
TomTom.lua
diff --git a/TomTom.lua b/TomTom.lua
index af44ed9..8fabe04 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -49,8 +49,11 @@ do
     -- and converts it to a c,z,x,y tuple
     function compat:GetCurrentPlayerPosition()
         local map, floor, x, y = Astrolabe:GetCurrentPlayerPosition()
-        local c, z = unpack(mapcz[map])
-        return c, z, x, y
+        local cz = mapcz[map]
+        if cz then
+            local c, z = unpack(cz)
+            return c, z, x, y
+        end
     end

     function compat:GetDirectionToIcon(...)