Posted 10 March 2013 - 12:20 AM
Hi all,
I have a problem with my code.
When I start this code and press the key y or n then nothing will happen. Tutle do not print:
print "Na prvu poziciu v inventary turtly"
print "daj torche a uhlie daj lubovolne !"
print "Ked uz to mas pripravene stlac \"y\""
and error is black screen…
Please help me…
I have a problem with my code.
When I start this code and press the key y or n then nothing will happen. Tutle do not print:
print "Na prvu poziciu v inventary turtly"
print "daj torche a uhlie daj lubovolne !"
print "Ked uz to mas pripravene stlac \"y\""
and error is black screen…
Please help me…
function vyber()
while true do
event, p1 = os.pullEvent()
if event == "char" and p1 == "y" then
term.clear()
term.setCursorPos (1,1)
print "Na prvu poziciu v inventary turtly"
print "daj torche a uhlie daj lubovolne !"
print "Ked uz to mas pripravene stlac \"y\""
if event == "char" and p1 == "y" then
for l = 2,16 do
turtle.select(l)
turtle.refuel(64)
if turtle.getFuelLevel() == 0 then
term.clear()
term.setCursorPos (1,1)
print "Turtlicka nema palivo! Vloz uhlie do"
print "inventara turtlicky !"
return
end
end
begin()
begin2()
end
break
elseif event == "char" and p1 == "n" then
term.clear()
term.setCursorPos (1,1)
print "Vloz uhlie lubovolne do inventara"
print "turtlicky !"
print "Ked uz to mas pripravene stlac \"y\""
if event == "char" and p1 == "y" then
for l = 1,16 do
turtle.select(l)
turtle.refuel(64)
if turtle.getFuelLevel() == 0 then
term.clear()
term.setCursorPos (1,1)
print "Turtlicka nema palivo! Vloz uhlie do"
print "inventara turtlicky !"
return
end
end
begin()
begin2()
end
end
end
end
vyber()