Posted 29 July 2013 - 09:25 AM
Hey. I don't know what i must change to fix this error. I hope someone can help me.
Elaniel greets from Germany
Elaniel greets from Germany
local arg = { ... }
local side = "back"
local output = "top"
items = {
["Cobblestone"]=1,
["Planks"]=2,
["Dirt"]=4,
["Sandstone"]=8,
["Stone"]=16,
["Brick"]=32,
["Iron"]=64,
["Copper"]=128,
["Silver"]=256,
["Gold"]=512,
["Tin"]=1024,
["Electrum"]=2048,
["Lead"]=4096,
["Ferrous"]=8192,
["Brass"]=16384,
["Steel"]=32768
}
function clearScreen()
term.clear()
term.setCursorPos(1,1)
end
function get()
clearScreen()
print("Was für ein Item willst du?")
userInputItem = read()
clearScreen()
print("Menge?")
userInputItems = read()
userInputItems = tonumber(userInputItems)
clearScreen()
print("Fetching "..userInputItems.." of "..userInputItem.."...")
i=0
while i < userInputItems do
rs.setBundledOutput(side, items[userInputItem])
sleep(0.5)
rs.setBundledOutput(side, 0)
sleep(0.5)
i = i + 1
end
clearScreen()
print("Hole "..userInputItems.." con "..userInputItem.." ! ")
end
function send()
clearScreen()
print("Anzahl der Stacks?")
amount = read()
amount = tonumber(amount)
x = 0
clearScreen()
print("Sende Items...")
while x < amount do
rs.setOutput(output, true)
sleep(0.5)
rs.setOutput(output, false)
sleep(0.5)
x = x + 1
end
clearScreen()
print("Items gesendet!")
end
if arg[1] == "get" then
get()
elseif arg[1] == "send" then
send()
else
clearScreen()
print("Ungültig. Bitte benutze <get> oder <send>")
end