ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   GetApiVersion() no longer works? (https://www.esoui.com/forums/showthread.php?t=9673)

marcjordan 04/06/21 05:16 PM

GetApiVersion() no longer works?
 
Howdy,

[edit] Thanks to Baertram it's API, not Api. In my defense the error info wasn't sufficient for my casual lua knowledge and time available :)
Code:

d(string.format("%s",GetAPIVersion()))
[/edit]

I've been using GetApiVersion for awhile now and in the latest update it seems to have stopped working. I checked the latest release API dox and it's still there and still returns an integer. Here's line 10 of my lua file:

Code:

EsoGrinder.api_version = GetApiVersion()
And here's the BugCatcher log:

Code:

user:/AddOns/EsoGrinder/EsoGrinder.lua:10: function expected instead of nil
stack traceback:
user:/AddOns/EsoGrinder/EsoGrinder.lua:10: in function '(main chunk)'

If I change it so that GetApiVersion is called later:

Code:

EsoGrinder.api_version = 0
...
115: function EsoGrinder.OnSlashCommandApiVersion(extra)
116:    EsoGrinder.api_version = GetApiVersion()
117:    d(EsoGrinder.api_version)
118: end

I get this error:

Code:

user:/AddOns/EsoGrinder/EsoGrinder.lua:116: function expected instead of nil
stack traceback:
user:/AddOns/EsoGrinder/EsoGrinder.lua:116: in function 'EsoGrinder.OnSlashCommandApiVersion'
<Locals> extra = "" </Locals>
EsoUI/Ingame/SlashCommands/SlashCommands_Shared.lua:204: in function 'DoCommand'
<Locals> text = "/egrapiversion", command = "/egrapiversion", arguments = "", fn = user:/AddOns/EsoGrinder/EsoGrinder.lua:115 </Locals>
EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:1785: in function 'SharedChatSystem:SubmitTextEntry'
<Locals> self = [table:1]{allowMultipleContainers = F, shouldMinimizeAfterEntry = F, ignoreTextEntryChangedEvent = F, currentChannel = 31, loaded = T, maxContainerWidth = 2575.2211914063, currentNumNotifications = 1, maxContainerHeight = 1448.5618896484, minContainerHeight = 170, suppressSave = F, numUnreadMails = 23, minContainerWidth = 300, isMinimized = F, lastValidChannel = 0, isAgentChatActive = F}, text = "/egrapiversion", valid = F, prefix = 47 </Locals>
EsoUI/Ingame/ChatSystem/SharedChatSystem.lua:2493: in function 'ZO_ChatTextEntry_Execute'
<Locals> control = ud </Locals>
ZO_ChatWindowTextEntryEditBox_Enter:3: in function '(main chunk)'
<Locals> self = ud </Locals>
(tail call): ?
(tail call): ?


Sharlikran 04/06/21 05:19 PM

I use it all the time and if it broke I would have a bizzilion posts that there is a bug. I was just using it in the mod I'm working on.

Baertram 04/06/21 06:10 PM

It always was and still is: GetAPIVersion()

Capital API

Returns 100034 on live

marcjordan 04/10/21 01:57 PM

Quote:

Originally Posted by Baertram (Post 43672)
It always was and still is: GetAPIVersion()

Capital API

Returns 100034 on live

That's it. Dang. Thank you!


All times are GMT -6. The time now is 02:11 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI