Thread Tools Display Modes
10-01-10, 06:33 PM   #1
Whunkle
A Defias Bandit
Join Date: Sep 2010
Posts: 3
Saving Variables so I don't spam people!

Thanks for the help!

Last edited by Whunkle : 10-02-10 at 01:18 PM.
  Reply With Quote
10-01-10, 07:32 PM   #2
Xubera
A Cobalt Mageweaver
 
Xubera's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 207
you need to add to your .toc

##SavedVariables: myAddonDB

and then to your .lua

lua Code:
  1. --just before a whisper
  2.    if not myAddonDB then myAddonDB = {} end
  3.    if myAddonDB[charname] then
  4.      --dont whisper
  5.    else
  6.       --whisper
  7.       myAddonDB[charname] = true
  8.    end
  9. --

because you do not need the variables as soon as you log in, then you dont really need to register for VARIABLES_LOADED
__________________
Chat Consolidate is the solution to any out of control trade chat. Ignore lines, throttle chat, consolidate posts!Follow the link to find out how!

▲ ▲ WoWInterface wont let me triforce >.>
  Reply With Quote
10-02-10, 01:18 PM   #3
Whunkle
A Defias Bandit
Join Date: Sep 2010
Posts: 3
Thank you, works great! Easy fix.
  Reply With Quote
10-02-10, 08:28 PM   #4
Cralor
Mmm... cookies!!!
 
Cralor's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 772
Originally Posted by Whunkle View Post
Thank you, works great! Easy fix.
For future reference, feel free to keep your original post in tact. It will let other members see the question/issue you were having so that maybe they can understand the answer themselves.
__________________
Never be satisfied with satisfactory.
  Reply With Quote
10-02-10, 09:03 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Yes, otherwise there are just replies and answers with no question or context.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Saving Variables so I don't spam people!


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