Lyqyd, on 07 July 2012 - 12:17 AM, said:
I really can't guess at what's not working correctly without seeing the current code, sorry.
I FOUND IT!!!
Apparently, I have 2 tekkit servers, one of which I thought had the world I was playing in. WRONG! I found the coding!
local function subMenu()
while true do
term.clear()
term.setCursorPos(1,1)
print ()
print ("**************************************************")
print ()
print (" Reactor Menu")
print ()
print ("1. Start Reactor")
print ("2. Start Refill Timer")
print ("3. Stop Reactor")
print ("4. Back")
e, p = os.pullEvent()
if e == char then
if p == "1" then
while true do
term.clear()
term.setCursorPos(1,1)
print ("Loading Mainframe...")
sleep(3)
print ()
print ("Loading Subsystems...")
sleep(2)
print()
print ("Starting Reactor...")
sleep(2)
redstone.setOutput("back", true)
sleep(2)
print ()
print (" Reactor Successfully Started")
return
end
elseif p == "2" then
term.clear()
term.setCursorPos(1,1)
print ("Starting Timer...")
redstone.setOutput("left", true)
sleep(2)
return
elseif p == "3" then
print ("Stopping Reactor...")
sleep(4)
rs.setOutput("back", false)
sleep(2)
print ("Reactor Stopped.")
sleep(2)
return
elseif p == "4" then
return
end
end
end
end
-- Variables go here
x = 1
y = 2
z = 5
r = (x + y)
s = (y + z)
t = (x + z)
--Beginning of Code
while true do
term.clear()
term.setCursorPos(1,1)
print ()
print ("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
print ("--------------------------------------------------")
print ()
print (" Welcome to the Nuclear Reactor Mainframe!")
print ()
print ("Please Choose an Action")
print ("1. Reactor Menu")
print ("2. Early Warning Systems")
print ("3. Emergancy Shutdown")
print ("4. Cooldown Settings")
e, p = os.pullEvent()
if p == "1" then
subMenu()
elseif p == "2" then
print ("hi")
end
end
end
-- I haven't actually finished this part here, just made a filler so I could test the program.
When I test the program, I can access the submenu (good) but I can't access any of the submenu's functions (bad).
Hope this helps!
Thanks!