From fe3fe3802cc4478b5e7686114b9e1041685f7e81 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Mon, 8 Oct 2012 10:37:14 +0200 Subject: [PATCH] Fix callback bug, clean up leaked globals --- TomTom.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TomTom.lua b/TomTom.lua index 74a0429..556ec39 100755 --- a/TomTom.lua +++ b/TomTom.lua @@ -893,7 +893,7 @@ function TomTom:AddMFWaypoint(m, f, x, y, opts) end -- No need to convert x and y because they're already 0-1 instead of 0-100 - self:SetWaypoint(uid, callbacks, opts.minimap, opts.world) + self:SetWaypoint(uid, opts.callbacks, opts.minimap, opts.world) if opts.crazy then self:SetCrazyArrow(uid, opts.arrivaldistance, opts.title) end @@ -1028,7 +1028,7 @@ do function Block_OnClick(self, button, down) local m,f,x,y = TomTom:GetCurrentPlayerPosition() local zoneName = lmd:MapLocalize(m,f) - local desc = format("%s: %.2f, %.2f", zoneName, x*100, y*100) + local desc = string.format("%s: %.2f, %.2f", zoneName, x*100, y*100) TomTom:AddMFWaypoint(m, f, x, y, { title = desc, }) @@ -1168,7 +1168,7 @@ SlashCmdList["TOMTOM_WAY"] = function(msg) -- Find a fuzzy match for the zone local matches = {} - lzone = lowergsub(zone) + local lzone = lowergsub(zone) for name, mapId in pairs(nameToMapId) do local lname = lowergsub(name) @@ -1244,7 +1244,7 @@ SlashCmdList["TOMTOM_WAY"] = function(msg) -- Find a fuzzy match for the zone local matches = {} - lzone = lowergsub(zone) + local lzone = lowergsub(zone) for name,mapId in pairs(nameToMapId) do local lname = lowergsub(name) -- 1.7.9.5