Ammako, could you reword your example? At least for me, it sounded confusing.
Edit. OK, this should be more clear: During ADDON_LOADED event cleanExit obtains the saved value (for example, true). In step 2 the value of cleanExit is changed to false. However, game crashes and the new value of cleanExit isn't saved. Could detection of crash be attempted by using /played? |
Quote:
|
Something is amiss, some cvars are not being enforced it seems.
Maybe i fucked something up? If anyone is able to fix it? Ideally it should enforce only on login and reload. X33STORM.lua Code:
local function eventHandler(self,event,...) |
In a situation like this, you should be more specific about what's not working.
|
Quote:
A recent non-cvar change i had to add, after adding camera cvars to the addon.was this: UIParent:UnregisterEvent("EXPERIMENTAL_CVAR_CONFIRMATION_NEEDED") Might be that, dunno. -------- Does this line mean on character login and reload? I was thinking i might need to add some PLAYER_LOGIN stuff too? frame:RegisterEvent("PLAYER_ENTERING_WORLD") |
Quote:
|
Quote:
The addon is named X33STORM, and alphabetically it should override any addons named from 1 > 9 and A > W. Could name it differently i guess, what is the last loaded symbol/number/letter ? !Z9 or something? As to register/unregister, i don't even know what they mean.. Just got a template from someone online, and put my own stuff in it. Could i see your addon you think? |
I reiterate, you should be more specific about what's not working. Just "some things aren't working" doesn't really help anyone figure out what may be wrong.
You might as well try and add a delay using C_Timer.After on those vars. Ghetto solution, but if it works. |
Quote:
I might just be it doesn't apply the cvars on ui reload, leaving me to think it wasn't working. Just looking for the event name for ui reload i suppose then, which i can't seem to find. frame:RegisterEvent("PLAYER_LOGIN") Maybe? I don't know lua or C** i'm afraid.. I really should take some time to learn what i need to know, to do what i want, just lazy i guess. |
Let's start over. Your original post implies, but doesn't actually say, that the code you posted isn't working the way you expect. Is it working as expected, or not? If it is working, what is the question you actually want answered? If it's not working, how is it not working -- what are you expecting it to do, and what actually happens instead?
|
There is no event for reload, it just fires PLAYER_ENTERING_WORLD again (maybe some others, but that one is your best bet.)
That event also fires whenever you go through a loading screen, on entering/exiting instances, for instance. Pun intended :] |
You don't have to know C++ to write addons for WoW. Lua and XML is all you need to know.
|
Quote:
|
Anyway, back on topic, @X33STORM if you can't just set your CVars through Advanced Interface Options and your current code isn't working, here is the code I've been using to set my CVars for about a decade without any problems:
https://github.com/phanx-wow/PhanxUI...ster/CVars.lua |
@Phanx - I know, I know. My memory is totally shot, now, and I couldn't remember what XML was (basically) used for :o . Thank you for clearing that up.
|
All times are GMT -6. The time now is 12:49 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI