PDA

View Full Version : recurring error in GeographicalLocation.lua



kwaugh
January 19th, 2015, 07:05 PM
Recently, I've started receiving the following error throughout the day:

GeographicalLocation.lua:245 table index is nil

Here's the routine where it occurs. It looks like it's a routine that updates geographical location based on IP address.

if l.IP ~= self.Settings.IPAddress then -- only use if ip changed
-- now try and get data from maxmind which is better than above, but the above gets our ip...
-- Used to be maxmind.com, now using Promixis.com
local s = win.URLDownloadToMemory ('http://promixis.com/webservice/geoip.php?i='..l.IP)
if s then
local keys = {
'Country',
'Region',
'City',
'Latitude',
'Longitude',
}

local t = string.Split (s,',')

for i,v in ipairs (t) do
l [keys [i]] = v
end
end

self:SetLocation (l)
self:SetIP (l.IP)

Any thoughts on how to remedy this?

Thanks!

jmonier
January 20th, 2015, 08:27 AM
http://www.promixis.com/forums/showthread.php?21843-Problem-with-Geographical-Location

It sounds like your problem is related.

kwaugh
January 20th, 2015, 11:09 AM
That definitely sounds like the same problem. I was hoping to avoid modding the code my self, but I may end up going that route! Thanks!