View Single Post
05-30-10, 02:28 AM   #268
clowcadia
A Chromatic Dragonspawn
Join Date: Apr 2010
Posts: 186
been reading around tables,and ready programming with lua, and the explanations are very complex, and the coding is not very relative with the functions we use for wow. i had read such sites before i came here, and hence the reason i am still in this topic even now after been taught by graceful crystal. i find that programming with lua is for more intermediate coders, who have coded other languages that are just as complex like c++. where as i have only really coded HTML back maybe 5-6 years ago, and never bothered to touch php
so please spare me the frustration, and either guide me in the right way maybe help me understand the programming with lua site with examples. or give up on me
i personally dont ask for all your time, i just hope that i get some kind of help at some point. we are on forum only because we reply if we wish to and post if we need to. i do not expect someone to do this for me but i hope that someone could help me before my mind blows up from rocket science

i got 2 problems that cant be found in any documentation, or too complex to relate to
Code:
sessionValue = tonumber(sessionCount);
sessionInfo = { 
}
tinsert( sessionInfo, currentDate , sessionValue )
hmm understand
but is there a limit to what the value is?
because i got my value a subtable == [currentDate]
but when i do tinsert( sessionInfo, [currentDate] )
id gives me an erro
been trying this as well on it but nothing
tonumber(sessionValue)

btw the currentDate = date(its variables) and it displays the data correct in saved variables

Code:
local function recordingSessionInfo()
sessionCount = sessionCount + 1;
sessionInfo = sessionInfo or {}
sessionValue = tonumber(sessionCount);
sessionInfo = { 
}
tinsert( sessionInfo, currentDate, sessionCount )

end
Code:
local function onEvent(self,event,...)
----------------------------------------------
 if ( event == "ADDON_LOADED" ) then
addonLoadedCount = addonLoadedCount + 1;
sessionCount = sessionCount + 2;

  if ( addonLoadedCount == 3 ) then
  print("GVLT Loaded")
   
   recordingSessionInfo();

Last edited by clowcadia : 05-30-10 at 03:52 AM.
  Reply With Quote