10/26/14, 11:59 AM | #1 |
My code is acting up
Here is the thing I got my code working however it's not working at the entry of a new zone. The addon I'm working on is pretty simple. When you go to a zone it just pulls up a little info that lets you know how many quest that are there. I added the quest list myself using esohead and a little typing magic lol. But to give you an idea of what is happining when I go from one zone to another the addon doesn't update when you get to the new zone. I had to type /reloadui to get it to load the zone. I'll leave my code below so you can have a better look at it.
lua Lua Code:
xml Lua Code:
txt Lua Code:
If you see what is wrong try and explain in the simplest way possible. I'm still new to coding and explanations help me a lot. |
|
10/27/14, 12:13 AM | #2 |
|
Here is what I see:
you have Lua Code:
Lua Code:
You might want to add clampedToScreen to the control so it can't go off of the screen and give your window a starting dimension & anchor point in your xml file Lua Code:
Make this local, It only holds the defaults, no reason for it to be accessible globally Lua Code:
And there are a couple of small errors here too: Lua Code:
Lua Code:
Last edited by circonian : 10/27/14 at 05:11 AM. |
10/27/14, 04:48 AM | #3 | ||
My comments:
Lua Code:
Last edited by Garkin : 10/27/14 at 07:42 AM. Reason: Corrected, it is as Merlight says... |
|||
10/27/14, 05:13 AM | #4 |
|
I knew it had to be unique, but I also thought it had to be the addon name.
I didn't know if you left it nil it would use GuiRoot either. I edited my post to remove those comments to avoid confusion. Nice to know, thanks for the info. |
10/27/14, 06:10 AM | #5 |
|
|
10/27/14, 07:43 AM | #6 |
10/27/14, 03:40 PM | #7 |
I cleaned up a lot of this code from looking at all your suggestions. Only thing I haven't done yet is used Garkins suggestion for the zone index. However I think I want to do this and this is going to take a while to get all zones in lol I think it showed near 400 something zones or more. I want to add something that can track a little better like in if you done all the quest in the area or not. If any suggestions let me know. I will probably need help with the code. However you all are making me a lot better at this. Thank you all for the info and help.
|
|
10/27/14, 04:00 PM | #8 |
You can use achievements to check how many quests you have finished. You will need this function (copied from the documentation):
GetAchievementCriterion(achievementId, criterionIndex) Returns: description, numCompleted, numRequired Achievement is for example Auridon Adventurer, achievement ID 604 (number in url), this achievement has just one criteria, so criterionIndex will be 1 and you want to know how many quests you have already finished (numCompleted). Lua Code:
Last edited by Garkin : 10/27/14 at 04:03 PM. |
|
10/27/14, 04:21 PM | #9 |
I'm trying to understand how that works. If the achievement is only 37 quest and there are 51 quest in Auridon wouldn't it just say your finished after you do 37 quest instead of the actual 51 quest?
If I use this I want it to be a constant reminder for the user of questlurker. Would I have to make another window like the current one that says the zone name and quest number in it. I just finished adding the zone index you suggested Garkin. Thank you it seems to work a lot better when you go to areas that are not in the list. So now it's not poping an error every time someone goes to a place I haven't added yet. Last edited by zireko : 10/27/14 at 05:53 PM. |
|
10/27/14, 05:47 PM | #10 | |
Achievement IDs can be found: - Esohead (I gave you link in previous post, number in URL is achievement ID) - this post: http://www.esoui.com/forums/showthread.php?t=2117 - using the Zgoo addon (place mouse over achievement in Journal and type /zgoo mouse, in Zgoo window find table achievement and its key achievementId) - using the script which can be run from addon code or from ZAM Notebook, something like this: Lua Code:
|
||
ESOUI » Developer Discussions » General Authoring Discussion » My code is acting up |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|