Download
(17 Kb)
Download
Updated: 10/15/23 02:46 AM
Pictures
File Info
Compatibility:
Endless Archive (9.2.5)
Updated:10/15/23 02:46 AM
Created:06/27/14 12:58 PM
Monthly downloads:25,372
Total downloads:3,370,321
Favorites:1,779
MD5:
LibGPS  Popular! (More than 5000 hits)
Version: 3.3.2
by: sirinsidiator, votan
Have you ever tried to save or send a position on the map with your addon? You might have noticed that this is not as easy as it sounds.
This library efficiently converts a position on any map into a global position that you can save or share. This is made possible by measuring maps once when they are encountered for the first time during a play session and only doing simple calculations afterwards.

Dependencies
Make sure to install the following required libraries in order to use LibGPS.


Quick Start
Add the necessary statements in your addon manifest to load the files:
Code:
## DependsOn: LibGPS>=30
NOTE: The >=30 tells the game to require AddOnVersion 30 or greater, which happens to be the first version with the 3.0 API and has nothing to do with the semantic version. It is simply a build number provided by the build script used to package the library.

In order to use the library you have to get an instance from the global variable:
Code:
local gps = LibGPS3
Next you can convert a position on the currently active map into a global position on the Tamriel map by calling LocalToGlobal.
For example you can convert the local player position into a global position with the following line of code:
Code:
local x, y = gps:LocalToGlobal(GetMapPlayerPosition("player"))
The resulting x and y can be saved, sent or whatever else you want to do with it.
NOTE: For some locations the global coordinates can be outside the bounds for normalized coordinates, for example Coldharbour has negative x coordinates as it is to the left of Tamriel in the global coordinate space.

After you have loaded or received a global position you just need to call GlobalToLocal to get the position on the current map.
Code:
local x, y = gps:GlobalToLocal(x, y)


Migrating from LibGPS2
LibGPS3 offers full backwards compatibility to LibGPS2 (see compatibility.lua), but it's still highly recommended to migrate to the new API.
In order to use the new API, simply access the library via the "LibGPS3" global variable instead of "LibGPS2" or LibStub.
Most functions stayed the same between v2 and v3, but there are a few breaking changes. The following list shows how to migrate those cases.

Renamed functions
Some function names have been changed to better reflect the return value.
  • ClearCurrentMapMeasurements -> ClearCurrentMapMeasurement
  • GetCurrentMapMeasurements -> GetCurrentMapMeasurement
  • CalculateMapMeasurements -> CalculateMapMeasurement

Measurement object
GetCurrentMapMeasurement now returns an object with some convenience methods instead of a plain table. See the description below in the API reference for details on what it can do.

LocalToGlobal
The mapIndex return value has been removed as our understanding of what a map is has changed and it was deemed unnecessary for most use cases.
If you still need it, you can use GetCurrentMapMeasurement() to fetch the measurement object and retrieve it from there.

ZoneToGlobal
This method was used a long time ago to offer a way to migrate LibGPS1 coordinates. Since then it has become effectivly unnecessary and only causes confusion. As such it has been removed without replacement.

PanToMapPosition
This has become easily possible via ingame functionality since the time it was initially added to the library. Simply use "ZO_WorldMap_GetPanAndZoom():PanToNormalizedPosition(x, y)" instead.

OnLibGPS2MeasurementChanged callback
There is now a constant LIB_EVENT_STATE_CHANGED for the callback name, which should be used instead of the plain string.



API Reference
Here is a complete list of the functionality that is provided by LibGPS:

IsReady
Returns true as long as the player exists.
Code:
lib:IsReady()
IsMeasuring
Returns true if the library is currently doing any measurements.
Code:
lib:IsMeasuring()
ClearMapMeasurements
Removes all cached measurement values.
Code:
lib:ClearMapMeasurements()
ClearCurrentMapMeasurement
Removes the cached measurement for the map that is currently active.
Code:
lib:ClearCurrentMapMeasurement()
GetCurrentMapMeasurement
Returns a measurement object for the active map or nil if the measurement could not be calculated for some reason.
See the description of the Measurement object for details.
Code:
Measurement measurement = lib:GetCurrentMapMeasurement()
GetMapMeasurementByMapId
Returns a measurement object for the requested map id or nil if the measurement could not be calculated for some reason.
See the description of the Measurement object for details.
Code:
Measurement measurement = lib:GetMapMeasurementByMapId(mapId)
GetCurrentMapParentZoneIndices
Returns the mapIndex, zoneIndex and zoneId of the parent zone for the currently set map.
Code:
number mapIndex, number zoneIndex, number zoneId = lib:GetCurrentMapParentZoneIndices()
CalculateMapMeasurement
Calculates the measurement for the current map and all parent maps.
This method does nothing if there is already a cached measurement for the active map.
Returns a boolean to indicate if the measurement was successful and a SetMapResultCode indicating if the map has changed independently of the actual result of the measurement.
Code:
boolean isSuccess, SetMapResultCode result = lib:CalculateMapMeasurement()
LocalToGlobal
Converts the given map coordinates on the current map into coordinates on the Tamriel map.
Returns x and y on the world map or nil if the measurements of the active map are not available.
Code:
number x, number y = lib:LocalToGlobal(number x, number y)
GlobalToLocal
Converts the given global coordinates into a position on the active map.
Returns x and y on the current map or nil if the measurements of the active map are not available.
Code:
number x, number y = lib:GlobalToLocal(number x, number y)
SetPlayerChoseCurrentMap
This function sets the current map as player chosen so it won't snap back to the previous map.
Code:
lib:SetPlayerChoseCurrentMap()
SetMapToRootMap
Sets the best matching root map on the given global position: Tamriel, Cold Harbour or Clockwork City and what ever will come.
Returns SET_MAP_RESULT_FAILED, SET_MAP_RESULT_MAP_CHANGED depending on the result of the API calls.
Code:
SetMapResultCode result = lib:SetMapToRootMap(number globalX, number globalY)
MapZoomInMax
Repeatedly calls ProcessMapClick on the given global position starting on the root map (using the function above) until nothing more would happen.
Returns SET_MAP_RESULT_FAILED, SET_MAP_RESULT_MAP_CHANGED or SET_MAP_RESULT_CURRENT_MAP_UNCHANGED depending on the result of the API calls.
Code:
SetMapResultCode result = lib:MapZoomInMax(number globalX, number globalY)
PushCurrentMap
This function stores information about how to return to the current map on a stack.
Code:
lib:PushCurrentMap()
PopCurrentMap
Switches to the last map that was put on the stack.
Returns SET_MAP_RESULT_FAILED, SET_MAP_RESULT_MAP_CHANGED or SET_MAP_RESULT_CURRENT_MAP_UNCHANGED depending on the result of the API calls.
Code:
SetMapResultCode result = lib:PopCurrentMap()
GetCurrentWorldSize
Returns the current size of Tamriel in world-units.
Code:
number scale = lib:GetCurrentWorldSize()
GetLocalDistanceInMeters
Returns the distance in meters of given local coords.
Code:
number distance = lib:GetLocalDistanceInMeters(number lx1, number ly1, number lx2, number ly2)
GetGlobalDistanceInMeters
Returns the distance in meters of given global coords.
Code:
number distance = lib:GetGlobalDistanceInMeters(number gx1, number gy1, number gx2, number gy2)
GetWorldGlobalRatio
Returns how much greater the level is compared to its size on the map.
Code:
number ratio = lib:GetWorldGlobalRatio()
GetGlobalWorldRatio
Returns how much smaller global scaled values must be to fit the current level.
Code:
number ratio = lib:GetGlobalWorldRatio()
lib.LIB_EVENT_STATE_CHANGED
This callback is fired on the global CALLBACK_MANAGER when a map measurement begins or ends and passes the same value as lib:IsMeasuring().
If you have a custom handler for player waypoints in EVENT_MAP_PING you may want to ignore these events while a measurement is active.
Code:
CALLBACK_MANAGER:RegisterCallback(lib.LIB_EVENT_STATE_CHANGED, function(boolean isMeasuring) end)


Measurement
This object returned by GetCurrentMapMeasurement() contains all the data about a map measurement and offers some convenience functions to interact with them.

GetId
Returns a unique id for the measurement which is used to store it in the saved variables. Details are implementation specific and may change between versions.
Code:
local id = measurement:GetId()
GetMapIndex
Returns the mapIndex or nil if the measured map doesn't have one.
Code:
local mapIndex = measurement:GetMapIndex()
GetZoneId
Returns the zoneId for the measurement. Keep in mind that a map can have multiple zoneIds within its borders and a zoneId can also span multiple maps.
Code:
local zoneId = measurement:GetZoneId()
GetScale
Returns the scale in the global coordinate space for the current map.
Code:
local scaleX, scaleY = measurement:GetScale()
GetOffset
Returns the offset in the global coordinate space for the current map.
Code:
local offsetX, offsetY = measurement:GetOffset()
IsValid
Returns true if the measurement contains valid data.
Code:
local valid = measurement:IsValid()
ToGlobal
Converts and returns global coordinates for a given local coordinate pair. Used by LocalToGlobal.
Code:
local gx, gy = measurement:ToGlobal(x, y)
ToLocal
Converts and returns local coordinates for a given global coordinate pair. Used by GlobalToLocal.
Code:
local x, y = measurement:ToLocal(gx, gy)
GetCenter
Returns the center of the measured map as global coordinates.
Code:
local cx, cy = measurement:GetCenter()
Contains
Returns true if the given global coordinates are inside the measured map.
Code:
local inside = measurement:Contains(gx, gy)
version 3.3.2:
- API bump for U40.
- Handle ingame missing map bug in GetLocalDistanceInMeters().

version 3.3.1:
- Fixed typo. Thanks to @M-ree.
- Fixed missing parameter. Thanks to @HansK.
- Better "sub-zone without own map" handling.

version 3.3.0 - votan
Update for Necrom:
  • New extra dimension: Aphocrypha.
  • Better world size calculation.
  • Replaced GetPlayerPosition with GetNormalizedPositionFromWorld where possible to get around the "frozen" positions.
  • No need to persist world size measurements. One variable file less to load and save.
  • Fixed sub-zones without own map, but different world scale.
  • Removed unused code: WaypointManager.

version 3.2.0 - sirinsidiator
  • Added new api to GetMeasurementByMapId (#17, thanks Thal-J!)
  • Updated API version in manifest

version 3.1.0 - votan
  • Update to API 101032.
  • Use GetUniversallyNormalizedMapInfo.
  • New root maps: Fargrave and Deathlands.

version 3.0.3 - sirinsidiator & votan
  • Fixed nil error in some locations
  • Fixed incorrect world size in some locations

version 3.0.2 - sirinsidiator & votan
  • Added hook for SetMapToMapId
  • Fixed some problems regarding Blackreach
  • Simplified some internal code utilizing new API functions
  • Updated API version in manifest

version 3.0.1 - sirinsidiator
  • Added hook for SetMapToDigSitePosition (#10, thanks Shinni!)
  • Fixed compatibility assertion when LibStub is not loaded

version 3.0.0 - sirinsidiator & votan
  • Updated code structure and split it into multiple files
  • Changed saved variable format to be more compact
  • Switched to semantic versioning
  • Switched to LibDebugLogger and LibChatMessage for debug and chat output respectively
    • NOTE: Make sure you have them installed separately!
  • Introduced a new API v3 and added compatibility layer for LibGPS2 ->
    • NOTE: Check the migration guide on the description tab to see what has changed and how to switch to the new API
  • Added experimental support for calculating distances in world space
    • NOTE: Let us know if you find any problems
  • Fixed some bugs and introduced new ones
  • Updated API version in manifest


version 2.0 r21 - sirinsidiator
  • Reverted a change that would cause measurements to be incorrect in combination with mini map addons
    • NOTE: Persisted measurements will be wiped automatically

version 2.0 r20 - sirinsidiator
  • Fixed error when LibStub is not loaded

version 2.0 r19 - sirinsidiator
  • Fixed version updates for persistent measurements not working correctly in some cases
  • Fixed ClearMapMeasurements not removing persistent data
  • Fixed map measurements producing illegal values when the player pin is near the world origin for some reason, which could result in inaccurate measurements or even errors on load.
    • NOTE: The error will still show up on the first load after updating the library, but should be gone after that

version 2.0 r18 - votan
  • Persist measurements. Do not do them on every (re-)load again.
  • API version update.
  • Hook SetMapToAutoMapNavigationTargetPosition, too.
  • LibMapPing not bundled anymore.

version 2.0 r17 - votan
  • Update to API 100027 "Elsweyr".

version 2.0 r16 - sirinsidiator
  • fixed error due to renamed methods in Murkmire

version 2.0 r15 - votan
  • Handling the new zone "Artaeum".

version 2.0 r14 - votan
  • Fixed MapZoomInMax. Now working for Cold Harbour and Clockwork City aswell.
  • New function SetMapToRootMap(x, y) using global coordinates to choose the right root map.
  • LibMapPing rev 6
    • Fixed map ping events can cause wrong waypoint/rally pins in combination with addons changing the current map.

version 2.0 r13 - votan
  • Fixed issue with missing waypoint pin, if addons use different revisions. Thanks to @babylon.
  • Fully compatible with Morrowind+, now.
  • Restore pan & zoom after measurement as well.

version 2.0 r12 - votan
  • Handling the new zone "Clockwork City".

version 2.0 r11 - votan
  • Fixed issue, which was fixed in rev9 and lost in rev10, again. e.g. "Show on Map"
  • Update API version in manifest
  • Make use of new API functions to get pin manager and pan to location.

version 2.0 r10 - sirinsidiator
  • added new method GetCurrentMapParentZoneIndices
  • update API version in manifest

version 2.0 r9 - votan
  • Fixed issue with maps like "Blackwood Borderlands".
  • update API version in manifest

version 2.0 r8 - sirinsidiator
  • updated LibMapPing to r5
  • update API version in manifest

version 2.0 r7.1 - sirinsidiator
  • fixed issue in PopCurrentMap where it would throw an error on some maps

version 2.0 r7a - sirinsidiator
  • updated the bundled LibMapPing to r4
  • no other changes

version 2.0 r7 - sirinsidiator
  • fixed player waypoints not showing on the map in some cases
  • removed some compatibility code for old API

version 2.0 r6 - sirinsidiator
  • Prepared library for API version 100014
  • Improved measurement algorithm for better addon compatibility
  • Added LibMapPing to handle silent setting of map pings
    • Note: This is a required dependency and you need to include it in your addon and load it before LibGPS
  • Added two new functions PushCurrentMap and PopCurrentMap to handle returning to a previous map

version 2.0 r5.4 - votan
  • Fixed muting waypoint click sound can get stucked. (you need to place the waypoint more times until it is working again)
  • Hooked ProcessClick to get map measurement while clicking down to a (sub-)zone already.

version 2.0 r5.3 - votan
  • Restore player waypoint correctly. Broken since ESO 2.2.5???

version 2.0 r5.2 - votan
  • New functions IsReady() and IsMeasuring()
  • Earlier initialization: LibGPS is ready at player activation.

version 2.0 r5.1 - votan
  • New origin map location detection does not use localized names (GetMapName, GetPlayerLocationName) anymore. Instead working with SetMapToPlayerLocation. Thanks to circonian for inspiring idea.

version 2.0 r5 - votan
  • Origin map location detection: isPlayerLocation uses in-string search and exception list.
  • Hook all SetMapTo* functions, for a deterministic last action
Both changes hopefully fixing problems with dungeons.

version 2.0 r4.3 - votan
  • Fixed map measurement for dungeons like "The Harborage".
  • Removed code for API 100011.

version 2.0 r4.2 - votan
  • Fix for recent changes to EVENT_MAP_PING behavior. (Update 7)

version 2.0 r4.1 - votan
  • Fixed minor bug with Transitus Shrine of alliance base: Depending on when LibGPS does its measurement, you got locked to the alliance base subzone, because map navigation is disabled while interacting with a Transitus Shrine.

version 2.0 r4 - votan
  • ESO 2.1 API 100012 ready
  • Event name is public now: lib.LIB_EVENT_STATE_CHANGED
  • Fixing issue if near a wayshrine sub-zone: Map was not detected as current player location
  • For devs: new switch to enable debug: lib.debugMode = 1

version 2.0 r3 - votan
  • Rewrote calculation of map measurements to get rid of using zo_callLater to prevend timing issues
  • Introduced new event callback to get notified when measurement starts and ends

version 2.0.1 - sirinsidiator
features
  • updated to latest API version

version 2.0 - sirinsidiator
features
  • rewrote calculation of map measurements to be more robust and efficient fixing many cases where calculations where not working as intended
  • changed library to use real global positions (tamriel coordinates)
  • added counter measure against a bug in the game where the waypoint is lost when entering or leaving some dungeons
  • fixed libGPS interfering with manually changing the map to one that has not been measured yet
  • changed how the waypoint sounds are muted to prevent the whole UI from being muted permanently in some cases
  • added error messages with attached debug information that can be copied to clipboard
  • split off CalculateCurrentMapMeasurements function from GetCurrentMapMeasurements
  • added ZoneToGlobal function to convert from old global coordinates to new format
  • added ClearCurrentMapMeasurements function to clear measurements of only the current map
  • added PanToMapPosition function which allows to pan to any position on the current map
  • added MapZoomInMax function which zooms in as far as possible (map wise) for a given global position
  • added SetPlayerChoseCurrentMap function which allows you to set the current map as player chosen, thus preventing the map from automatically snapping back.

version 1.0.1 - sirinsidiator
features
  • renamed zoneIndex to mapIndex to avoid confusion (thanks Garkin)
Optional Files (0)


Archived Files (40)
File Name
Version
Size
Uploader
Date
3.3.1
17kB
votan
08/26/23 07:01 AM
3.3.0
16kB
votan
05/17/23 12:51 PM
3.2.0
18kB
sirinsidiator
06/06/22 02:02 PM
3.1.0
18kB
votan
10/02/21 11:38 AM
3.0.3
18kB
sirinsidiator
11/11/20 06:00 AM
3.0.2
18kB
sirinsidiator
11/09/20 11:50 AM
3.0.1
18kB
sirinsidiator
04/25/20 11:44 AM
3.0.0
18kB
sirinsidiator
04/24/20 03:36 AM
2.0 r21
11kB
sirinsidiator
02/28/20 04:10 PM
2.0 r20
11kB
sirinsidiator
02/27/20 01:51 PM
2.0 r19
11kB
sirinsidiator
02/26/20 03:26 PM
2.0_r18
11kB
votan
01/11/20 04:23 PM
r17
20kB
sirinsidiator
05/15/19 01:15 PM
r16
28kB
sirinsidiator
09/19/18 10:48 AM
r15
19kB
votan
04/29/18 01:35 PM
r14
19kB
votan
11/07/17 12:25 PM
r13
19kB
votan
10/08/17 09:52 AM
r12
19kB
votan
09/29/17 11:32 AM
r11
19kB
sirinsidiator
02/13/17 12:57 PM
r10
19kB
sirinsidiator
01/28/17 01:49 PM
r9
18kB
votan
09/30/16 11:04 AM
r8
19kB
sirinsidiator
07/14/16 02:47 PM
r7.1
18kB
sirinsidiator
04/24/16 12:55 PM
r7a
18kB
sirinsidiator
03/19/16 09:00 AM
r7
18kB
sirinsidiator
03/14/16 10:45 AM
r6
18kB
sirinsidiator
02/20/16 11:43 AM
2.0 r5.4
11kB
votan
12/06/15 02:53 PM
2.0 r5.3
11kB
votan
11/25/15 03:10 PM
2.0 r5.2
11kB
votan
11/08/15 09:24 AM
2.0 r5.1
11kB
votan
10/01/15 10:56 AM
2.0 r5
11kB
votan
09/19/15 07:39 AM
2.0 r4.3
10kB
votan
09/06/15 01:39 AM
2.0 r4.2
10kB
votan
08/30/15 12:13 PM
2.0 r4.1
10kB
votan
08/21/15 11:03 AM
2.0 r4
10kB
votan
08/13/15 01:05 PM
2.0 r3
8kB
votan
04/23/15 12:33 PM
2.0.1
7kB
sirinsidiator
08/06/14 09:14 AM
2.0
7kB
sirinsidiator
07/30/14 01:58 PM
1.0.1
3kB
sirinsidiator
06/28/14 06:44 AM
1.0
3kB
sirinsidiator
06/27/14 12:58 PM


Post A Reply Comment Options
Unread 10/14/23, 02:03 AM  
votan
 
votan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 578
File comments: 1678
Uploads: 40
Re: new error

Originally Posted by HansK
Again an error in Clockworkcity. Can you please take a look?

Code:
user:/AddOns/LibGPS/TamrielOMeter.lua:298: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/TamrielOMeter.lua:298: in function 'TamrielOMeter:GetLocalDistanceInMeters'
(tail call): ?
user:/AddOns/LibQuestData/LibQuestData.lua:105: in function 'internal:quest_in_range'
user:/AddOns/LibQuestData/LibQuestData.lua:994: in function 'update_quest_information'
user:/AddOns/LibQuestData/LibQuestData.lua:1069: in function 'OnPlayerActivatedQuestBuild'
Was it Brass Fortress again or somewhere else?
It seems to be an ingame bug. Go to the wayshrine of Brass Fortress. Disable all addons using the switch. Logout and login again. Open the map. What you see is the issue.
@ZOS_DanBatson The issue remains in U40.
Report comment to moderator  
Reply With Quote
Unread 10/12/23, 11:23 PM  
votan
 
votan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 578
File comments: 1678
Uploads: 40
Re: new error

Originally Posted by HansK
Again an error in Clockworkcity. Can you please take a look?

Code:
user:/AddOns/LibGPS/TamrielOMeter.lua:298: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/TamrielOMeter.lua:298: in function 'TamrielOMeter:GetLocalDistanceInMeters'
(tail call): ?
user:/AddOns/LibQuestData/LibQuestData.lua:105: in function 'internal:quest_in_range'
user:/AddOns/LibQuestData/LibQuestData.lua:994: in function 'update_quest_information'
user:/AddOns/LibQuestData/LibQuestData.lua:1069: in function 'OnPlayerActivatedQuestBuild'
Sorry for the delay. I am very busy. The problem seems, that there is no measurement data for your position. I can avoid the error, but have to find out why there is no measurement.
Report comment to moderator  
Reply With Quote
Unread 08/29/23, 02:45 AM  
HansK

Forum posts: 0
File comments: 41
Uploads: 0
new error

Again an error in Clockworkcity. Can you please take a look?

Code:
user:/AddOns/LibGPS/TamrielOMeter.lua:298: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/TamrielOMeter.lua:298: in function 'TamrielOMeter:GetLocalDistanceInMeters'
(tail call): ?
user:/AddOns/LibQuestData/LibQuestData.lua:105: in function 'internal:quest_in_range'
user:/AddOns/LibQuestData/LibQuestData.lua:994: in function 'update_quest_information'
user:/AddOns/LibQuestData/LibQuestData.lua:1069: in function 'OnPlayerActivatedQuestBuild'
Report comment to moderator  
Reply With Quote
Unread 08/27/23, 07:36 PM  
ggurman
 
ggurman's Avatar

Forum posts: 0
File comments: 19
Uploads: 0
ESO crashing since LibGPS update

Since updating LibGPS today, ESO has been crashing. I backed up all addons then removed them from the addons folder, and I was able to log in without crashing. I then moved over all lib addons, and ESO crashed. So, since LibGPS was the only lib addon updated today, I removed it and I was able to log in without crashing. I restored all other addons and was able to log in. So it seems to be LibGPS that's causing the crashes.

If there's anything I can do to provide more information, please let me know.
Report comment to moderator  
Reply With Quote
Unread 08/26/23, 03:32 AM  
HansK

Forum posts: 0
File comments: 41
Uploads: 0
Thumbs up Re: Re: Error turning in quest

Originally Posted by votan
Originally Posted by HansK
Got an error today turning in a Clockworkcity daily. Don't have enough knowledge to determine if LibGPS fails first and then LibQuestData or the other way around. So if someone can take a look at it please?


Code:
user:/AddOns/LibGPS/TamrielOMeter.lua:285: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/TamrielOMeter.lua:285: in function 'TamrielOMeter:GetLocalDistanceInMeters'
	<Locals> self = [table:1]{measuring = F}, lx1 = 0.0010259747238404, ly1 = -0.0014856457774475, lx2 = 0.58850371837616, ly2 = 0.54274517297745, worldSizeX = 1, worldSizeY = 1 </Locals>
(tail call): ?
user:/AddOns/LibQuestData/LibQuestData_Scan.lua:611: in function 'OnQuestRemoved'
	<Locals> eventCode = 131095, isCompleted = T, journalIndex = 11, questName = "Inciting the Imperfect", zoneIndex = 589, poiIndex = 294967291, questID = 6076, quest_to_update = [table:2]{zone_name = "Clockwork City", name = "Inciting the Imperfect", x = 0.58850371837616, giver = "Clockwork Facilitator", lang = "en", gpsx = 0.26374479441336, quest_display_type = 0, poi_index = 294967291, y = 0.54274517297745, questID = 6076, quest_type = 1, api = 101039, gpsy = 1.0312107889382, repeat_type = 2, zone_index = 589}, the_zone = "clockwork/brassfortress_base_0...", the_entry = 2, giver_name_result = 100045, quest_info_changed = T, save_quest_location = T, temp_giver = [table:3]{}, temp_quest_name = "Inciting the Imperfect", currentApiVersion = 101039, the_quest_info = [table:4]{1 = 1}, temp_quest_info = [table:5]{1 = 1}, the_quest_loc_info = [table:6]{1 = 0.58850371837616}, regular_quest_list = [table:7]{} </Locals>
Yep, found something. Thanks.
Report comment to moderator  
Reply With Quote
Unread 08/26/23, 03:00 AM  
votan
 
votan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 578
File comments: 1678
Uploads: 40
Re: Error turning in quest

Originally Posted by HansK
Got an error today turning in a Clockworkcity daily. Don't have enough knowledge to determine if LibGPS fails first and then LibQuestData or the other way around. So if someone can take a look at it please?


Code:
user:/AddOns/LibGPS/TamrielOMeter.lua:285: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/TamrielOMeter.lua:285: in function 'TamrielOMeter:GetLocalDistanceInMeters'
	<Locals> self = [table:1]{measuring = F}, lx1 = 0.0010259747238404, ly1 = -0.0014856457774475, lx2 = 0.58850371837616, ly2 = 0.54274517297745, worldSizeX = 1, worldSizeY = 1 </Locals>
(tail call): ?
user:/AddOns/LibQuestData/LibQuestData_Scan.lua:611: in function 'OnQuestRemoved'
	<Locals> eventCode = 131095, isCompleted = T, journalIndex = 11, questName = "Inciting the Imperfect", zoneIndex = 589, poiIndex = 294967291, questID = 6076, quest_to_update = [table:2]{zone_name = "Clockwork City", name = "Inciting the Imperfect", x = 0.58850371837616, giver = "Clockwork Facilitator", lang = "en", gpsx = 0.26374479441336, quest_display_type = 0, poi_index = 294967291, y = 0.54274517297745, questID = 6076, quest_type = 1, api = 101039, gpsy = 1.0312107889382, repeat_type = 2, zone_index = 589}, the_zone = "clockwork/brassfortress_base_0...", the_entry = 2, giver_name_result = 100045, quest_info_changed = T, save_quest_location = T, temp_giver = [table:3]{}, temp_quest_name = "Inciting the Imperfect", currentApiVersion = 101039, the_quest_info = [table:4]{1 = 1}, temp_quest_info = [table:5]{1 = 1}, the_quest_loc_info = [table:6]{1 = 0.58850371837616}, regular_quest_list = [table:7]{} </Locals>
Yep, found something. Thanks.
Report comment to moderator  
Reply With Quote
Unread 08/22/23, 06:04 AM  
HansK

Forum posts: 0
File comments: 41
Uploads: 0
Error turning in quest

Got an error today turning in a Clockworkcity daily. Don't have enough knowledge to determine if LibGPS fails first and then LibQuestData or the other way around. So if someone can take a look at it please?


Code:
user:/AddOns/LibGPS/TamrielOMeter.lua:285: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/TamrielOMeter.lua:285: in function 'TamrielOMeter:GetLocalDistanceInMeters'
	<Locals> self = [table:1]{measuring = F}, lx1 = 0.0010259747238404, ly1 = -0.0014856457774475, lx2 = 0.58850371837616, ly2 = 0.54274517297745, worldSizeX = 1, worldSizeY = 1 </Locals>
(tail call): ?
user:/AddOns/LibQuestData/LibQuestData_Scan.lua:611: in function 'OnQuestRemoved'
	<Locals> eventCode = 131095, isCompleted = T, journalIndex = 11, questName = "Inciting the Imperfect", zoneIndex = 589, poiIndex = 294967291, questID = 6076, quest_to_update = [table:2]{zone_name = "Clockwork City", name = "Inciting the Imperfect", x = 0.58850371837616, giver = "Clockwork Facilitator", lang = "en", gpsx = 0.26374479441336, quest_display_type = 0, poi_index = 294967291, y = 0.54274517297745, questID = 6076, quest_type = 1, api = 101039, gpsy = 1.0312107889382, repeat_type = 2, zone_index = 589}, the_zone = "clockwork/brassfortress_base_0...", the_entry = 2, giver_name_result = 100045, quest_info_changed = T, save_quest_location = T, temp_giver = [table:3]{}, temp_quest_name = "Inciting the Imperfect", currentApiVersion = 101039, the_quest_info = [table:4]{1 = 1}, temp_quest_info = [table:5]{1 = 1}, the_quest_loc_info = [table:6]{1 = 0.58850371837616}, regular_quest_list = [table:7]{} </Locals>
Last edited by HansK : 08/22/23 at 07:04 AM.
Report comment to moderator  
Reply With Quote
Unread 08/06/23, 03:11 AM  
votan
 
votan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 578
File comments: 1678
Uploads: 40
Re: SET_MAP_RESULT_MAP_FAILED

Originally Posted by DakJaniels
should line 44 of MapAdapter.lua
Lua Code:
  1. if(result ~= SET_MAP_RESULT_MAP_FAILED and not lib:GetCurrentMapMeasurement()) then

be
Lua Code:
  1. if(result ~= SET_MAP_RESULT_FAILED and not lib:GetCurrentMapMeasurement()) then
Yes, correct. Good catch.
Report comment to moderator  
Reply With Quote
Unread 08/05/23, 02:23 PM  
DakJaniels
AddOn Author - Click to view AddOns

Forum posts: 33
File comments: 136
Uploads: 4
SET_MAP_RESULT_MAP_FAILED

should line 44 of MapAdapter.lua
Lua Code:
  1. if(result ~= SET_MAP_RESULT_MAP_FAILED and not lib:GetCurrentMapMeasurement()) then

be
Lua Code:
  1. if(result ~= SET_MAP_RESULT_FAILED and not lib:GetCurrentMapMeasurement()) then
Report comment to moderator  
Reply With Quote
Unread 09/06/22, 09:52 AM  
AlbinoPython
AddOn Author - Click to view AddOns

Forum posts: 24
File comments: 121
Uploads: 10
Thanks for the tip I will check that out.

Originally Posted by sirinsidiator
Originally Posted by AlbinoPython
@sirinsidiator, I am the author of Provinatus and I get this error when a player uses a wayshrine to go to another zone and also when entering a delve. Seems like an issue getting the current map measurements but not sure what it is. Do I need to wait for some 'zone loaded' event before calling this method?

Originally Posted by Paraselene Alqwi
This occurs in the "Provinatus" addon every time I zone change, including into and out of houses, dungeons, etc. The error originates from LibGPS. I am not sure which addon needs to be addressed.

Link to Provinatus: https://esoui.com/downloads/info1943...UpDisplay.html

Code:
user:/AddOns/LibGPS/TamrielOMeter.lua:288: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/TamrielOMeter.lua:288: in function 'TamrielOMeter:GetLocalDistanceInMeters'
|caaaaaa<Locals> self = [table:1]{measuring = F}, lx1 = 0, ly1 = 0, lx2 = 0, ly2 = 0, worldSizeX = 1, worldSizeY = 1 </Locals>|r
(tail call): ?
user:/AddOns/Provinatus/Projection.lua:18: in function 'ProvinatusProjection:Project'
|caaaaaa<Locals> self = [table:2]{}, X = 0, Y = 0, Projection = [table:3]{} </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:175: in function 'ProvinatusDriver:DrawElements'
|caaaaaa<Locals> self = [table:4]{}, Layer = [table:5]{}, Elements = [table:6]{}, RenderedElements = [table:7]{}, Index = 1, Element = [table:8]{Alpha = 1, Height = 24, Width = 24, X = 0, Y = 0, Texture = "/esoui/art/icons/mapkey/mapkey..."} </Locals>|r
user:/AddOns/Provinatus/Layers/PlayerOrientation.lua:19: in function 'ProvinatusPlayerOrientation:Update'
|caaaaaa<Locals> self = [table:5], Elements = [table:6], Element = [table:8] </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:144: in function 'ProvinatusDriver:OnUpdate'
|caaaaaa<Locals> self = [table:9]{DisplayEnable = T, X = 0, GroupSize = 0, Heading = 0, __isAbstractClass = F, Y = 0}, Name = 15, Layer = [table:5] </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:123: in function '(anonymous)'
There is currently an issue where the game allows addon code to run too early after loading screens when the map is not ready yet. This will be addressed by ZOS in a future update.

If you want to work around this issue, you could check if GetMapFilterType returns 0 before running any map related code, since that value should not be possible unless the map system is not ready. However since this is purely a game bug and not an actual case that would exist outside of that, it may be better to just wait for the actual fix in the game itself.

I'm also not sure if there is anything I could do in the lib, since this case is really just an addon interacting with the map at a wrong time. I could add the check in my code, but then I'd pretty much have to throw an assertion error myself, since the function was simply called at the wrong time and there is no correct result it could return at this moment.
Report comment to moderator  
Reply With Quote
Unread 09/06/22, 05:04 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1579
File comments: 1132
Uploads: 41
Originally Posted by AlbinoPython
@sirinsidiator, I am the author of Provinatus and I get this error when a player uses a wayshrine to go to another zone and also when entering a delve. Seems like an issue getting the current map measurements but not sure what it is. Do I need to wait for some 'zone loaded' event before calling this method?

Originally Posted by Paraselene Alqwi
This occurs in the "Provinatus" addon every time I zone change, including into and out of houses, dungeons, etc. The error originates from LibGPS. I am not sure which addon needs to be addressed.

Link to Provinatus: https://esoui.com/downloads/info1943...UpDisplay.html

Code:
user:/AddOns/LibGPS/TamrielOMeter.lua:288: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/TamrielOMeter.lua:288: in function 'TamrielOMeter:GetLocalDistanceInMeters'
|caaaaaa<Locals> self = [table:1]{measuring = F}, lx1 = 0, ly1 = 0, lx2 = 0, ly2 = 0, worldSizeX = 1, worldSizeY = 1 </Locals>|r
(tail call): ?
user:/AddOns/Provinatus/Projection.lua:18: in function 'ProvinatusProjection:Project'
|caaaaaa<Locals> self = [table:2]{}, X = 0, Y = 0, Projection = [table:3]{} </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:175: in function 'ProvinatusDriver:DrawElements'
|caaaaaa<Locals> self = [table:4]{}, Layer = [table:5]{}, Elements = [table:6]{}, RenderedElements = [table:7]{}, Index = 1, Element = [table:8]{Alpha = 1, Height = 24, Width = 24, X = 0, Y = 0, Texture = "/esoui/art/icons/mapkey/mapkey..."} </Locals>|r
user:/AddOns/Provinatus/Layers/PlayerOrientation.lua:19: in function 'ProvinatusPlayerOrientation:Update'
|caaaaaa<Locals> self = [table:5], Elements = [table:6], Element = [table:8] </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:144: in function 'ProvinatusDriver:OnUpdate'
|caaaaaa<Locals> self = [table:9]{DisplayEnable = T, X = 0, GroupSize = 0, Heading = 0, __isAbstractClass = F, Y = 0}, Name = 15, Layer = [table:5] </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:123: in function '(anonymous)'
There is currently an issue where the game allows addon code to run too early after loading screens when the map is not ready yet. This will be addressed by ZOS in a future update.

If you want to work around this issue, you could check if GetMapFilterType returns 0 before running any map related code, since that value should not be possible unless the map system is not ready. However since this is purely a game bug and not an actual case that would exist outside of that, it may be better to just wait for the actual fix in the game itself.

I'm also not sure if there is anything I could do in the lib, since this case is really just an addon interacting with the map at a wrong time. I could add the check in my code, but then I'd pretty much have to throw an assertion error myself, since the function was simply called at the wrong time and there is no correct result it could return at this moment.
Report comment to moderator  
Reply With Quote
Unread 09/05/22, 04:04 PM  
AlbinoPython
AddOn Author - Click to view AddOns

Forum posts: 24
File comments: 121
Uploads: 10
@sirinsidiator, I am the author of Provinatus and I get this error when a player uses a wayshrine to go to another zone and also when entering a delve. Seems like an issue getting the current map measurements but not sure what it is. Do I need to wait for some 'zone loaded' event before calling this method?

Originally Posted by Paraselene Alqwi
This occurs in the "Provinatus" addon every time I zone change, including into and out of houses, dungeons, etc. The error originates from LibGPS. I am not sure which addon needs to be addressed.

Link to Provinatus: https://esoui.com/downloads/info1943...UpDisplay.html

Code:
user:/AddOns/LibGPS/TamrielOMeter.lua:288: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/TamrielOMeter.lua:288: in function 'TamrielOMeter:GetLocalDistanceInMeters'
|caaaaaa<Locals> self = [table:1]{measuring = F}, lx1 = 0, ly1 = 0, lx2 = 0, ly2 = 0, worldSizeX = 1, worldSizeY = 1 </Locals>|r
(tail call): ?
user:/AddOns/Provinatus/Projection.lua:18: in function 'ProvinatusProjection:Project'
|caaaaaa<Locals> self = [table:2]{}, X = 0, Y = 0, Projection = [table:3]{} </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:175: in function 'ProvinatusDriver:DrawElements'
|caaaaaa<Locals> self = [table:4]{}, Layer = [table:5]{}, Elements = [table:6]{}, RenderedElements = [table:7]{}, Index = 1, Element = [table:8]{Alpha = 1, Height = 24, Width = 24, X = 0, Y = 0, Texture = "/esoui/art/icons/mapkey/mapkey..."} </Locals>|r
user:/AddOns/Provinatus/Layers/PlayerOrientation.lua:19: in function 'ProvinatusPlayerOrientation:Update'
|caaaaaa<Locals> self = [table:5], Elements = [table:6], Element = [table:8] </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:144: in function 'ProvinatusDriver:OnUpdate'
|caaaaaa<Locals> self = [table:9]{DisplayEnable = T, X = 0, GroupSize = 0, Heading = 0, __isAbstractClass = F, Y = 0}, Name = 15, Layer = [table:5] </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:123: in function '(anonymous)'
Report comment to moderator  
Reply With Quote
Unread 08/26/22, 08:13 AM  
Paraselene Alqwi

Forum posts: 0
File comments: 19
Uploads: 0
This occurs in the "Provinatus" addon every time I zone change, including into and out of houses, dungeons, etc. The error originates from LibGPS. I am not sure which addon needs to be addressed.

Link to Provinatus: https://esoui.com/downloads/info1943...UpDisplay.html

Code:
user:/AddOns/LibGPS/TamrielOMeter.lua:288: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/TamrielOMeter.lua:288: in function 'TamrielOMeter:GetLocalDistanceInMeters'
|caaaaaa<Locals> self = [table:1]{measuring = F}, lx1 = 0, ly1 = 0, lx2 = 0, ly2 = 0, worldSizeX = 1, worldSizeY = 1 </Locals>|r
(tail call): ?
user:/AddOns/Provinatus/Projection.lua:18: in function 'ProvinatusProjection:Project'
|caaaaaa<Locals> self = [table:2]{}, X = 0, Y = 0, Projection = [table:3]{} </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:175: in function 'ProvinatusDriver:DrawElements'
|caaaaaa<Locals> self = [table:4]{}, Layer = [table:5]{}, Elements = [table:6]{}, RenderedElements = [table:7]{}, Index = 1, Element = [table:8]{Alpha = 1, Height = 24, Width = 24, X = 0, Y = 0, Texture = "/esoui/art/icons/mapkey/mapkey..."} </Locals>|r
user:/AddOns/Provinatus/Layers/PlayerOrientation.lua:19: in function 'ProvinatusPlayerOrientation:Update'
|caaaaaa<Locals> self = [table:5], Elements = [table:6], Element = [table:8] </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:144: in function 'ProvinatusDriver:OnUpdate'
|caaaaaa<Locals> self = [table:9]{DisplayEnable = T, X = 0, GroupSize = 0, Heading = 0, __isAbstractClass = F, Y = 0}, Name = 15, Layer = [table:5] </Locals>|r
user:/AddOns/Provinatus/Provinatus.lua:123: in function '(anonymous)'
Report comment to moderator  
Reply With Quote
Unread 05/01/22, 11:18 AM  
Jester13

Forum posts: 0
File comments: 8
Uploads: 0
Re: Re: Re: Re: Constant error messages

Originally Posted by sirinsidiator
Originally Posted by Jester13
Originally Posted by votan
Originally Posted by Jester13
It's definitely this addon that's the problem. Here are the UI errors that show up:

user:/AddOns/LibGPS/WaypointManager.lua:42: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/WaypointManager.lua:42: in function 'WaypointManager:Initialize'
user:/AddOns/LibGPS/WaypointManager.lua:19: in function 'WaypointManager:New'
user:/AddOns/LibGPS/StartUp.lua:50: in function 'lib.internal:Initialize'
user:/AddOns/LibGPS/api.lua:172: in function '(main chunk)'

-----

user:/AddOns/LibGPS/api.lua:35: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/api.lua:35: in function 'lib:GetCurrentMapMeasurement'
user:/AddOns/LibGPS/MapAdapter.lua:48: in function 'SetMapToPlayerLocation'
/EsoUI/Ingame/Map/WorldMap.lua:3158: in function 'Update'



The second one repeats and I have to spam the E button to get rid of it, then quickly open the main menu to disable the addon before it starts up again.
1. At which location?
2. Try this: Delete the SavedVar of LibGPS while game is not running. The data is maybe corrupted.
1. It's at every location, no matter where I am. On every character who's got it.
2. I deleted the whole SavedVariables folder, as suggested by someone else on this thread, and that didn't work. I just looked into it right now, and... there's nothing for LibGPS. How do I add one?
I just checked. The error indicates that your installation of LibMapPing is broken. Reinstalling it should fix the issue.
Yeah, I just this moment fixed it haha. I'm probably not gonna use Minion to update anything in the future, I'll do it all manually.
Report comment to moderator  
Reply With Quote
Unread 05/01/22, 10:45 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1579
File comments: 1132
Uploads: 41
Re: Re: Re: Constant error messages

Originally Posted by Jester13
Originally Posted by votan
Originally Posted by Jester13
It's definitely this addon that's the problem. Here are the UI errors that show up:

user:/AddOns/LibGPS/WaypointManager.lua:42: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/WaypointManager.lua:42: in function 'WaypointManager:Initialize'
user:/AddOns/LibGPS/WaypointManager.lua:19: in function 'WaypointManager:New'
user:/AddOns/LibGPS/StartUp.lua:50: in function 'lib.internal:Initialize'
user:/AddOns/LibGPS/api.lua:172: in function '(main chunk)'

-----

user:/AddOns/LibGPS/api.lua:35: attempt to index a nil value
stack traceback:
user:/AddOns/LibGPS/api.lua:35: in function 'lib:GetCurrentMapMeasurement'
user:/AddOns/LibGPS/MapAdapter.lua:48: in function 'SetMapToPlayerLocation'
/EsoUI/Ingame/Map/WorldMap.lua:3158: in function 'Update'



The second one repeats and I have to spam the E button to get rid of it, then quickly open the main menu to disable the addon before it starts up again.
1. At which location?
2. Try this: Delete the SavedVar of LibGPS while game is not running. The data is maybe corrupted.
1. It's at every location, no matter where I am. On every character who's got it.
2. I deleted the whole SavedVariables folder, as suggested by someone else on this thread, and that didn't work. I just looked into it right now, and... there's nothing for LibGPS. How do I add one?
I just checked. The error indicates that your installation of LibMapPing is broken. Reinstalling it should fix the issue.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.