function battlestuff() local i = 1; for k,v in ipairs(htsData[realm][player].battles) do MyModData[i] = v i = i + 1 end end function MyMod_OnLoad() MyModScrollBar:Show() end function MyModScrollBar_Update() local line; -- 1 through 5 of our window to scroll local lineplusoffset; -- an index into our data calculated from the scroll offset FauxScrollFrame_Update(MyModScrollBar,50,5,16); for line=1,5 do lineplusoffset = line + FauxScrollFrame_GetOffset(MyModScrollBar); if lineplusoffset < 50 then getglobal("MyModEntry"..line.."_Text"):SetText(MyModData[lineplusoffset]); getglobal("MyModEntry"..line):Show(); else getglobal("MyModEntry"..line):Hide(); end end end battlestuff(); is called on the event "ADDON_LOADED" and MyModData is defined in hts_init(); loaded from onload