But so far i have this and even this dont work :(/> ……
function testprint
print("TesTING!...1...2...3...")
end
shell.run("monitor", "right", testprint)
function testprint
print("TesTING!...1...2...3...")
end
shell.run("monitor", "right", testprint)
functionName = function()
print("Codez")
end
functionName()
print("Codez")
end
We all make mistakes. :P/>omg im derped lool i forgot the () thanks man :)/>
functionName() print("Codez") end
function functionName()
print("Codez")
end
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")