Thread Tools Display Modes
10-20-06, 02:11 AM   #1
Tene
A Defias Bandit
Join Date: Oct 2006
Posts: 3
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?
  Reply With Quote
10-20-06, 02:35 AM   #2
Theon
A Theradrim Guardian
 
Theon's Avatar
AddOn Compiler - Click to view compilations
Join Date: Apr 2006
Posts: 65
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
__________________
Master of Whispers of the Frostbite Cabal, Premade RP-PvP guild:
http://www.frostbitecabal.com/forums/
  Reply With Quote
10-20-06, 03:17 AM   #3
Tene
A Defias Bandit
Join Date: Oct 2006
Posts: 3
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...
  Reply With Quote
10-20-06, 04:26 AM   #4
Gnarfoz
A Deviate Faerie Dragon
 
Gnarfoz's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 18
You can't make WoW write anything to disk when you want to on purpose.
  Reply With Quote
10-20-06, 04:55 AM   #5
Tene
A Defias Bandit
Join Date: Oct 2006
Posts: 3
well damn...

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

WoWInterface » Developer Discussions » General Authoring Discussion » Trigger to write SavedVariables file?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off