WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Trigger to write SavedVariables file? (https://www.wowinterface.com/forums/showthread.php?t=6601)

Tene 10-20-06 02:11 AM

Trigger to write SavedVariables file?
 
This question must have been asked before, a search in these and other boards came to no result, though.

I wrote an AddOn which depends on some variables, which should be "alive" over several sessions. If I log out of the game, the myAddon.lua in the SavedVariables directory is written and in the next session my AddOn can work with the values of the previous session. All fine.

Problem is
: when I disconnect (or at least fake to disconnect by pulling the cable ;)) the file is not written. The next session starts with empty variables.

My Question: Is there a function or a trick to make WoW write the file even when disconnecting? Or a method to update the file while still in the game?

Theon 10-20-06 02:35 AM

I'm oretty sure you can't get the game to write out savedvariables when disconnecting. But, you can save em while being ingame by a simple /console reloadui

Tene 10-20-06 03:17 AM

Yeah, I figured relaodui would do the trick but it's overkill for the variables I want to write. I'd hoped there was an API-function SaveVariables() or such...

Gnarfoz 10-20-06 04:26 AM

You can't make WoW write anything to disk when you want to on purpose. :)

Tene 10-20-06 04:55 AM

well damn... ;)

thanks for the insight...guess I have to fall back on reloadui then.


All times are GMT -6. The time now is 03:00 PM.

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