Posted 28 December 2012 - 07:16 PM
This is my first post so here goes nothing
I have a message board and it has 1 page on it full of rules and everything! looks amazing
but I want to create multiple pages or essentially messages so I attached a redstone to my comptuer and I came up with this code
now how do I go about to pushing the same button execute a second message? I got some help from the people on the IRC channel but the code I got back was incomplete or did not work, this was their code
sorry if that isnt entered the right way, got it off of IRC, lol
so that code only outputs a 1 and nothing else
Now my question is how do I create a message board that when I press a button it switches to the next page?
I have a message board and it has 1 page on it full of rules and everything! looks amazing
but I want to create multiple pages or essentially messages so I attached a redstone to my comptuer and I came up with this code
local green=false
local white=false
while true do
if rs.testBundledInput("right",colors.green) then
if not green then
mon = peripheral.wrap("top")
mon.clear()
mon.setCursorPos(1,1)
mon.write("Rule1:Blah Blah Blah Blah")
green=true
end
else
green=false
end
sleep(0.1)
end
now how do I go about to pushing the same button execute a second message? I got some help from the people on the IRC channel but the code I got back was incomplete or did not work, this was their code
local presses
lastState = 0
rs.getInput("back")
while true do
os.pullEvent("redstone")
if lastState and not rs.getInput("back") then
lastState = false
presses = presses + 1
print(presses) elseif not
lastState and rs.getInput("back") then
lastState = true
end
end
sorry if that isnt entered the right way, got it off of IRC, lol
so that code only outputs a 1 and nothing else
Now my question is how do I create a message board that when I press a button it switches to the next page?