WoW:Saving variables between game sessions: Difference between revisions

m
m (Updates for 1.8/1.9)
Line 28: Line 28:
If you have to store lots of pieces data, or data with dynamic keys, wrap it in one or two table variables rather than consuming huge quantities of global namespace.
If you have to store lots of pieces data, or data with dynamic keys, wrap it in one or two table variables rather than consuming huge quantities of global namespace.


The <tt>## SavedVaraibles:</tt> heading is used for data you want to be available to your addon no matter which character is playing. <tt>## SavedVariablesPerCharacter:</tt> is used for data that you ONLY want to be available to a specific character. There is no way of accessing another character's per-character data, so if you need to access other character's data, then you should use a regular per-addon saved table, and use indexes within that for realm and character.
The <tt>## SavedVariables:</tt> heading is used for data you want to be available to your addon no matter which character is playing. <tt>## SavedVariablesPerCharacter:</tt> is used for data that you ONLY want to be available to a specific character. There is no way of accessing another character's per-character data, so if you need to access other character's data, then you should use a regular per-addon saved table, and use indexes within that for realm and character.


=== The RegisterForSave function (Do not use this) ===
=== The RegisterForSave function (Do not use this) ===
Anonymous user