Posted 26 October 2012 - 01:41 PM
Hey all, I've written this script an for some reason I'm getting a java error on my server CMD and at my client's computer screen I get the value 38 returned when I start this script.
Could anyone tell me what is wrong with the script?
Screenshots
Server CMD
I'm using
Tekkit server 3.1.2
Thanks in advance
Could anyone tell me what is wrong with the script?
Screenshots
Spoiler
ClientServer CMD
I'm using
Tekkit server 3.1.2
-- variables --
id = 0
state = 0
active = true
---------------
-- functions --
local function cl()
term.clear()
end
local function cp(a,B)/>/>
term.setCursorPos(a,B)/>/>
end
active = true
state = 0
while active == true do
while state == 0 do
cl()
cp(1,1)
textutils.slowWrite("Please enter the ID to connect with.")
cp(1,3)
textutils.slowWrite("Computer ID: ")
sleep(0.5)
cmd = read()
if tonumber(cmd) > 0 then
id = cmd
cp(1,4)
textutils.slowWrite("Connecting with ID "..id..".")
sleep(2)
state = 1
else
cp(1,4)
textutils.slowWrite("ID must be a number!")
sleep(1)
state = 0
end
end
while state == 1 do
cl()
cp(1,1)
print(":D/>/>_:)/>/>_:D/>/>_:)/>/>_:)/>/>_:)/>/>_-_")
cp(1,2)
print("-_ ELEVATOR CPP vBeta.1 -_")
cp(1,3)
print("-_-/>/>_-_-/>/>_-_-/>/>_-_-/>/>_-_-/>/>_-_-/>/>_-_")
cp(1,5)
write("CMD: ")
comd = read()
if comd == "up" then
rednet.send(id,"up")
cp(1,6)
print("Command sent.")
end
if comd == "exit" then
cp(1,6)
textutils.slowWrite("shutting down...")
sleep(2)
cl()
cp(1,1)
print(":OS ROOT:")
cp(1,3)
active = false
end
end
end
Thanks in advance