Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
BasicTablePrinterV2
local itemsToPrint = { "TestString1"; "TestString2"; "TestString3"; } local timesToRepeat = 2 --How many times the table 'itemsToPrint' will be printed. local compileToOneString = true --If true, make a single text line with all items from the table. local compileDivider = " " --[[Is only read when compiled to a single string. Can be an alternative for serial. This is the text that goes between individual objects in the table.]] local showSerial = true --[[Is only read when compiled to a single string. Shows number in [] to show what number the object is. Recommended if some items have spaces in them to reduce confusion. (Divider can be an alternative if a visible character is used.)]] function printInfo(info, time, compile) --Main function. Really, the only function. for doRepeatPrint = 1,timesToRepeat do if not compile then for getInfo = 1,#info do print(info[getInfo]) end elseif compile then local singleString = "" for compileInfo = 1,#info do if not showSerial then singleString = singleString..""..compileDivider..""..info[compileInfo] elseif showSerial then singleString = singleString..""..compileDivider..""..info[compileInfo].. "["..compileInfo.."]" end end singleString = " "..singleString --This prevents the string from having a single space before it. This fixes it until a better fix is made. print(singleString:sub(1)) end print() print("_Started at time: "..time) print("Finished at time: "..os.time()) print("Time space [Seconds]: "..os.time() - time.." (Miliseconds: "..((os.time() - time)*1000)..")") end end printInfo(itemsToPrint,os.time(),compileToOneString)
run
|
edit
|
history
|
help
0
Area of Sector Calculator
personal use
Percentage Calculator (Subscribe to Madflag19)
Kegs Scores ... FOOOOOOTBALLLLLL
test random skill id
Uppercase
CC: LDInterface
roulette
Lua Timer
PAID HACK PuBG