1. This is probably a super easy table but I am getting stuck.

    Basically, I want the addon to save all the spells in the players spellbook to a table or each one to a variable.

    The end result (if it helps to understand what I am going for) is to have a frame that displays each spell the player knows, how much mana they have, and how many times they can cast it. Set to auto, it will automatically update the current amount of mana when a spell is cast, and update the amount of times all spells can be cast as a result. There is a manual mode as well, so the player can click a +/- button by each spell to see the results if they had cast it.

    I am pretty confident I can get everything working correctly (famous last words) with my current knowledge of LUA, but I am stuck on having a table/variables of learned spells to work with. This is probably so wrong you will laugh, but I think I need to do something like this: (this is my first attempt at a table, so please be gentle :p)

    local learnedspells = setmetatable({}, {__index=function(t,v) local a = {IsPlayerSpell(v)} if IsKnown == true then t[v] = a end return a end})