kwaugh
January 19th, 2015, 06: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!
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!