Posted 05 February 2013 - 07:27 AM
I have never got this error before! I tried to search around but never found anything that could fix my error…
Here is the code:
It's a very big program… :P/>
Hope someone can help me!
Tnx!
//Elis
EDIT: Sry for it taking up so much place! I dont know how to put it in a "window" :P/>
Here is the code:
function screen()
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colors.red)
print(" _________________________________________ ")
print(" | __________ | | __________ | ")
print(" | __________ | | __________ | ")
print(" |____________|_____________|____________| ")
print(" | | ")
print(" | | ")
print(" | | ")
print(" | | ")
print(" | | ")
print(" | | ")
print(" |_______________________________________| ")
print(" |_______________________________________| ")
print(" | | ")
print(" | | ")
print(" |_______________________________________| ")
print(" | | ")
print(" | | ")
print(" |_______________________________________| ")
end
function verision()
term.setTextColor(colors.lime)
term.setCursorPos(21,3)
print("E-Craft 2.0")
end
function redstone()
screen()
term.setCursorPos(8,6)
term.setTextColor(colors.orange)
print("1 Right On | 4 Front On | 7 ")
term.setCursorPos(8,7)
print("---------- ----------- ---------- ")
term.setCursorPos(8,8)
print("2 Left On | 5 Top On | 8 ")
term.setCursorPos(8,9)
print("---------- ----------- ---------- ")
term.setCursorPos(8,10)
print("3 Back On | 6 Down On | 9 Back ")
term.setCursorPos(7,14)
term.setTextColor(colors.cyan)
print("Choose Side:")
term.setCursorPos(20,14)
term.setTextColor(colors.orange)
local input = read()
if input == "1" then
term.setCursorPos(7,14)
term.setTextColor(colors.cyan)
print("Choose Time: ")
term.setCursorPos(20,14)
local time = tonumber(read())
redstone.setOutput("right",true)
sleep(time)
redstone.setOutput("right",false)
end
end
function mainPage()
term.setCursorPos(8,6)
term.setTextColor(colors.orange)
print("1 Redstone | 4 | 7 ")
term.setCursorPos(8,7)
print("---------- ----------- ---------- ")
term.setCursorPos(8,8)
print("2 Redpower | 5 | 8 Logout ")
term.setCursorPos(8,9)
print("---------- ----------- ---------- ")
term.setCursorPos(8,10)
print("3 Rednet | 6 | 9 Shutdown ")
term.setTextColor(colors.cyan)
term.setCursorPos(7,14)
print("Choose Program:")
term.setCursorPos(23,14)
term.setTextColor(colors.orange)
local input = read()
if input == "1" then
term.setCursorPos(7,17)
term.setTextColor(colors.cyan)
print("Redstone")
sleep(1)
term.setCursorPos(23,14)
print(" ")
term.setCursorPos(7,17)
print(" ")
redstone()
elseif input == "2" then
term.setCursorPos(7,17)
term.setTextColor(colors.cyan)
print("Redpower")
sleep(1)
term.setCursorPos(23,14)
print(" ")
term.setCursorPos(7,17)
print(" ")
mainPage()
elseif input == "3" then
term.setCursorPos(7,17)
term.setTextColor(colors.cyan)
print("Rednet")
sleep(1)
term.setCursorPos(23,14)
print(" ")
term.setCursorPos(7,17)
print(" ")
mainPage()
elseif input == "8" then
term.setCursorPos(7,17)
term.setTextColor(colors.cyan)
print("Loging out")
sleep(0.3)
term.setCursorPos(17,17)
print(".")
sleep(0.3)
term.setCursorPos(18,17)
print(".")
sleep(0.3)
term.setCursorPos(19,17)
print(".")
sleep(0.3)
term.setCursorPos(7,14)
print(" ")
term.setCursorPos(7,17)
print(" ")
term.setCursorPos(8,6)
print(" ")
term.setCursorPos(8,7)
print(" ")
term.setCursorPos(8,8)
print(" ")
term.setCursorPos(8,9)
print(" ")
term.setCursorPos(8,10)
print(" ")
logIn()
elseif input == "9" then
term.setCursorPos(7,17)
term.setTextColor(colors.cyan)
print("Shutting Down")
sleep(0.3)
term.setCursorPos(20,17)
print(".")
term.setCursorPos(21,17)
sleep(0.3)
print(".")
term.setCursorPos(22,17)
sleep(0.3)
print(".")
sleep(0.3)
os.shutdown()
else
term.setCursorPos(7,17)
term.setTextColor(colors.cyan)
print("Not a Program")
sleep(1)
term.setCursorPos(23,14)
print(" ")
term.setCursorPos(7,17)
print(" ")
mainPage()
end
end
function logIn()
term.setCursorPos(7,14)
term.setTextColor(colors.cyan)
print("User:")
term.setCursorPos(7,17)
print("Pass:")
term.setTextColor(colors.orange)
term.setCursorPos(13,14)
while true do
local user = read()
if user ~= "Elis" then
term.setCursorPos(13,14)
print(" ")
logIn()
end
term.setCursorPos(13,17)
local pass = read("*")
if pass ~= "1234" then
term.setCursorPos(13,14)
print(" ")
term.setCursorPos(13,17)
print(" ")
logIn()
else
term.setCursorPos(7,14)
print(" ")
term.setCursorPos(7,17)
print(" ")
mainPage()
end
end
end
screen()
verision()
logIn()
It's a very big program… :P/>
Hope someone can help me!
Tnx!
//Elis
EDIT: Sry for it taking up so much place! I dont know how to put it in a "window" :P/>