And I've gotten the code to this point and it seems to be working fine... except for a few things...
m = peripheral.wrap("back")
pos = 20
num = 1
dest = {
"This is Embankment. Change for other Circle Line Services in the direction of Bankside & Iron Road. This is a Inner Rail Circle Line train to Bankside (via Town Hall & Block Hill Road)",
"This is Bank, Change for District Link Services. This is a Circle Line train to Bankside (via Town Hall & Block Hill Road)",
"The next station is Cannon Street.",
"This is Cannon Street. This is a Circle Line train to Bankside (via Town Hall & Block Hill Road)",
"The next station is Sloane Square.",
"This is Sloane Square. This is a Circle Line train to Bankside (via Town Hall & Block Hill Road)",
"The next station is closed. This train will not stop at Blackfriars.",
"The next station is Town Hall.",
"This is Town Hall, Change for the Piccadilly Line. This is a Circle Line train to Bankside (via Block Hill Road)",
"This is Block Hill Road, Change for the Northern Line and District Link. This is a Circle Line train to Bankside (via Iron Hill)"
}
m.clear()
m.setTextScale(1.5)
while true do
if pos==-(#dest[num] + 1) then
pos = 20
end
if rs.getInput("left") then
num = num+1
pos = 20
else
num = num
end
if num==11 then
num = 1
end
m.clear()
m.setCursorPos(pos,3)
m.write(dest[num])
pos = pos-1
sleep(0.15)
end
It displays the text, scrolls it, and changes... that's where the issue then comes up. Before (when I had 4,000 "if" statements) I could just press a button and it would cycle it to the next piece of text in the list... but now that its in a different order and different code it somehow cycles all the way through to the one it was one, from the first announcement back to the first announcement. (Whilst typing has sudden realization) And I just remembered that I had also added in an extra announcement to the list... I think it would cycle the value "num" 10 times... (1 greater than the original 9 announcements...) so it would... *slams face into desk* So how can I get it to just change once and not cycle through the whole list? some simple thing I'm overlooking probably...