Posted 25 July 2012 - 04:08 PM
Hello everyone who is reading this =)
I'm trying to make a program for a Tekkit server my friend has
I have 1 monitor in the middle in the ground then i got 1 teleporter for each side of it except top and bottom ofc.
Im trying to make a program that gives you 4 places that you can teleport to like: Town - friend's house
i have only tried to make it work for just 1 destination so fare.
but i have some problems with this script it seems like the read() doesn't get the right number or something because it just give me the msg invalid dest.
[attachment=340:2012-07-25_16.56.24.png] [attachment=341:2012-07-25_16.56.33.png] [attachment=342:2012-07-25_17.05.58.png]
Does anyone know why?
or does anyone have some suggestions?
I'm trying to make a program for a Tekkit server my friend has
I have 1 monitor in the middle in the ground then i got 1 teleporter for each side of it except top and bottom ofc.
Im trying to make a program that gives you 4 places that you can teleport to like: Town - friend's house
i have only tried to make it work for just 1 destination so fare.
but i have some problems with this script it seems like the read() doesn't get the right number or something because it just give me the msg invalid dest.
local side = nil
local input = nil
term.clear()
term.setCursorPos(1,1)
print("Where do you wana teleport to?")
term.setCursorPos(1,2)
print("1-2-3-4")
input = read()
if input == 1 then
side = front
rs.setOutput(side,true)
sleep(5)
rs.setOutput(side,false)
print("teleported")
else
print(dist)
print("invalid dist")
end
[attachment=340:2012-07-25_16.56.24.png] [attachment=341:2012-07-25_16.56.33.png] [attachment=342:2012-07-25_17.05.58.png]
Does anyone know why?
or does anyone have some suggestions?