Posted 10 November 2014 - 11:15 PM
Hello! I am trying to count the amount of characters in a string that I get, and if it is above 17 (monitor limit) then it creates a new variable and prints both to the monitor.
My Current Code:
Is there any way to do this? Thanks!
My Current Code:
Spoiler
--API Loading
os.unloadAPI("sensors")
os.loadAPI("/rom/apis/sensors")
--Setup Monitor
mon = peripheral.wrap('top')
mon.setCursorPos(1,1)
mon.clear()
mon.setTextScale(1)
--Parse CommandLine Args
local args = {...}
local msg = args[1]
--Define MSG
if not msg then
msg = ('Hello, World!')
end
--Print!
mon.write(msg)
Is there any way to do this? Thanks!