Posted 29 March 2013 - 07:00 PM
Hey guys, I am trying to fancy up my rule boards and server information boards with some colour.
I have a working code but when ever I try to add in the term.setBackGroundColor I get rules:4: attempted to call nil
This is the code I have
I have a working code but when ever I try to add in the term.setBackGroundColor I get rules:4: attempted to call nil
This is the code I have
local w,h = term.getSize()
term.clear()
term.setCursorPos(1,1)
term.setBackgroundColor(colors.orange)
term.setTextColor(colors.blue)
local function printCenter(line)
local width = string.len(line)
if width < w then
local x,y = term.getCursorPos()
term.setCursorPos(w/2 - width/2,y)
end
print(line)
end
printCenter 'RULES'
print [[
1) No griefing.
2) No client hacks or mods.
3) Do not argue with, lie to or otherwise disrespect staff members.
4) No offensive behaviour, swearing, talking in all caps, skins or usernames.
5) Do not ask staff members to give you anything.
6) Do not engage in exploitative behaviour.
7) Do not engage in general misbehaviour.
8) Do not hide behind the rules.
9) Do not advertise other servers.
10) Leaking machines will be destroyed.
]]
printCenter 'Full list of rules with explanations and '
printCenter 'definitions are viewable at'
printCenter 'www.mistofempyrean.com'
term.restore()