Posted 01 October 2012 - 02:00 AM
Hey guys, since I'n planning on doing alot of networking, I've decided to write on a floppy disk an entire Modem Utility program.
Currently I'm doing the selections for opening a modem. Afterwards, I will be creating one to close modems. This program is the startup for the disk.
It seems that when I start this up from a disk, or from anything for that matter, everything shows up, including "That letter does not correspond to a side!" It also keeps flashing, indicating that it's rebooting. I'm not sure why it would be doing this if I haven't input anything yet. Help appreciated, thanks!
Currently I'm doing the selections for opening a modem. Afterwards, I will be creating one to close modems. This program is the startup for the disk.
term.clear()
term.setCursorPos(1,1)
write("Welcome to RedNet modem startup utility!")
term.setCursorPos(1,3)
write("Which side is your modem on?")
term.setCursorPos(1,4)
print("L = Left")
print("R = Right")
print("F = Front")
print("B = Back")
print("BT = Bottom")
print("T = Top")
term.setCursorPos(1,10)
write("Side: ")
local input = read
if input == "L" then
rednet.open(left)
elseif input == "R" then
rednet.open(right)
elseif input == "F" then
rednet.open(front)
elseif input == "B" then
rednet.open(back)
elseif input == "BT" then
rednet.open(bottom)
elseif input == "T" then
rednet.open(top)
else
term.setCursorPos(1,11)
print("That letter does not correspond to a side!")
sleep(3)
os.reboot()
end
It seems that when I start this up from a disk, or from anything for that matter, everything shows up, including "That letter does not correspond to a side!" It also keeps flashing, indicating that it's rebooting. I'm not sure why it would be doing this if I haven't input anything yet. Help appreciated, thanks!