New to the API. Already got stuck.
Are only addons uploaded to this website supported by the client? I've tried quite a few things to get started but nothing works so far. Even code of your wiki doesn't work. My first guess was that the wiki might be outdated but this code seems to work for other addons as well so wtf.
Do you have a Slack channel? The IRC channel is dead. I dislike creating threads to ask. I have 1 question every 10 minutes. I doubt you want me to spam your forums. Any help is very much appreciated. One of many attempts (I didn't save them all): https://gist.github.com/anonymous/2976abea033cb77b120f The code is based on CombatIndicator. An addon that does seem to work. I was hoping to receive an exception at least. But I'm getting ignored. |
Hi and welcome :)
Watch out the version number in the right corner. If there is no version number (currently 2.2.4) it is "out-dated". It may still works, but it's likely not a good example to start with. Try http://www.esoui.com/downloads/info934-HelloWorld.html And yes, keeping tutorials up-to-date is work, too :D Later on, you may check the "Developer Utilities" category: http://www.esoui.com/downloads/cat35.html |
Welcome!
If you do not see any output or errors at all, it might be an issue with your meta file which prevents your addon from getting loaded. Check if the addon is in the list of loaded addons ingame and if it is, put only error("test") in your file to see if the file is even loaded. Also don't worry about asking many questions on the forums. That's what they are here for. :D Haven't used Slack until now and don't think we have a Slack channel, but maybe someone could create one as an alternative to the more or less failed plan of making an ingame guild for exactly the same purpose? :rolleyes: |
Your code has holes all over it. :P
Also d() doesn't work at startup because (I think) the chat isn't available at that point (d() prints at the chat window). Are you sure you're putting the add-ons in the correct folder? I don't mean to be rude I'm just checking. I'd suggest you start with something even smaller, like a slash command that prints a message and then go from there in small steps. When you get the hang of it you'll naturally increase the size of each step. This, for instance: Code:
local function OnAddOnLoaded() Code:
# APIVersion: 100013 If you're in European server change "live" to "liveeu". Log in the game and see what happens when you type /myaddon. |
Quote:
Lua Code:
|
Quote:
Quote:
Didn't do anything. Is there something like a debug console I need to enable? The addon seems to be loaded: Quote:
https://gist.github.com/anonymous/323b5dc4352df3cfb43e |
If the error never shows up, it means the file does not get loaded. Can you upload the whole thing somewhere so we can see your addon manifest and folder structure?
|
Quote:
|
Quote:
When you defined the #Initialize method you used the dot notation, so "self" doesn't exist in there. Either you give that method the correct "self" object or you use the colon notation: Code:
function Maneuver:Initialize(...) Code:
function Maneuver.Initialize(self, ...) Code:
Maneuver:Initialize(...) Code:
Maneuver.Initialize(Maneuver, ...) Also no need for "GetEventManager()". That's exactly what was assigned to the global EVENT_MANAGER, so you can just use it. A big pro tip that worked really great for me was to read A REALLY LOT of the source code for the stock UI, you can find it here: http://esodata.uesp.net/current/src/luadir.html Just explore the folders and files reading randomly or search for something you'd like to see, you'll learn TONS of stuff about the API and Lua (and the methodologies and background of the developers at ZOS :banana:). EDIT. There, fixed it for you: https://gist.github.com/haggen/d5672ea740eb4ae326a0 |
Quote:
|
Quote:
But it doesn't really matter. I made esoui.slack.com too, so I guess vote for what you guys want :cool: PS, sorry for being slightly off topic :D:banana: |
Quote:
|
Guess I need an invite too: [email protected] :D
|
|
Quote:
Lua Code:
Lua Code:
|
Quote:
|
Quote:
|
Quote:
|
Final off topic post:
I think Haggen and I have settled on Gitter for quick communication. See his post here - http://www.esoui.com/forums/showthre...5676#post25676 |
Quote:
|
All times are GMT -6. The time now is 03:16 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI