But so far i have this and even this dont work
function testprint
print("TesTING!...1...2...3...")
end
shell.run("monitor", "right", testprint)
Posted 25 December 2012 - 08:30 PM
function testprint
print("TesTING!...1...2...3...")
end
shell.run("monitor", "right", testprint)
Posted 25 December 2012 - 09:15 PM
functionName = function()
print("Codez")
end
functionName()
print("Codez")
end
Posted 25 December 2012 - 09:17 PM
Posted 26 December 2012 - 02:28 AM
Posted 26 December 2012 - 03:35 AM
s_monitorSide = "left" -- The side in which the monitor sits in respect of the computer
monitor = peripheral.wrap(s_monitorSide)
if not monitor then
print("Monitor is not on the " .. s_monitorSide .. " side.\nSearching for one automatically.")
for i, side in pairs(rs.getSides()) -- This will automatically search
if peripheral.getType(side) == "monitor" then -- for a monitor on all available
s_monitorSide = side -- sides
break
end
end
return -- If no monitor is found, it will then return to shell.
end
--[[
Now in order to make printing easier, we make a function to print,
because you can only write to the monitor, which does not go
to the next line automatically.
--]]
function monPrint(text)
cX, cY = monitor.getCursorPos()
monitor.write(text) -- This will write the text to the monitor
monitor.setCursorPos(cX, cY+1) -- This will change the cursor to the next line
end
monPrint("Hello!")
monPrint("This text is being printed on the monitor on the " .. s_monitorSide)
monPrint("This should be the 3rd line if the monitor is big")
0 members, 1 guests, 0 anonymous users