View Single Post
10-21-15, 01:24 PM   #11
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by saxitoxin View Post
Thanks for the example Lightspark, it will be easyer for me to both read and learn this now

only thing is that I get a error: -- snip --

it say 98 here but in your code it is really 93 because I added some things before your code

from what I can tell it does not get any data from "playerData"
Hmm... Could you post whole file content then? Cuz Fizzlemizz is correct. Spending time guessing is quite wasteful.

Originally Posted by saxitoxin View Post
also, if I want to add faction into this do I then add bracets like this "realmData[playerFaction[playerName]]"
Nope, it'll be realmData[playerFaction][playerName], because "playerFaction" and "playerName" are string values.

One more thing, I see that you have settings.lua file. Ideally, SV save/load process ("ADDON_LOADED" and "PLAYER_LOGOUT" handlers) should be there, and gold-related stuff from "PLAYER_LOGIN" handler should be left in gold.lua file. But that's what you should do after you figure out how SVs work, so you can painlessly rewrite my code the way you need.
__________________

Last edited by lightspark : 10-21-15 at 01:56 PM.
  Reply With Quote