View Single Post
03-22-13, 12:06 PM   #5
Benalish
A Flamescale Wyrmkin
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 123
Is a DYNAMIC table

I write an example of how it should work my script

Lua Code:
  1. local foobar = {
  2.     [1] = "Welcome#To#My#World",
  3.     [2] = "Secret#To#The#End",
  4.     [3] = "My#Little#Universe",
  5. }
  6.  
  7. function buffscan(x)
  8.          local meow = { strsplit("#", foobar[x] }
  9.         -- do something
  10. end
  11.  
  12. local timer = 0
  13.  
  14. local function onUpdate(self,elapsed)
  15.     timer = timer + elapsed
  16.     while (timer >= 0.75) do
  17.         for x, key in ipairs(foobar) do
  18.             buffscan(x)
  19.         end
  20.         timer = timer - elapsed
  21.     end
  22. end
  23.  
  24. local f = CreateFrame("frame")
  25. f:SetScript("OnUpdate", onUpdate)
  Reply With Quote