S.....r konto usunięte 10.02.2014, 22:19:50 1 + #minecraft #computercraft wtf? mon = peripheral.wrap("right")mon.setBackgroundColor(colors.black)mon.clear()file = fs.open("template", "r")lines = 1templates = {}while true do line = file.readLine() if line == nil then break end templates[lines] = {} templates[lines]["x"] = line line = file.readLine() templates[lines]["y"] = line line = file.readLine() color = line print(templates[lines]["x"]) mon.setCursorPos(templates[lines]["x"], template[lines]["y"]) mon.setBackgroundColor(colors.red) mon.write(" ") lines = lines+1end i error na 23 "expected number, number"w pliku template pierwsza linijka zawiera wyłącznie cyfrę 1
A.....q konto usunięte 10.02.2014, 22:20:59 0 + @SiarkoWodor: a moze powinno być number PRZECINEK number xD
mon = peripheral.wrap("right")
mon.setBackgroundColor(colors.black)
mon.clear()
file = fs.open("template", "r")
lines = 1
templates = {}
while true do
line = file.readLine()
if line == nil then
break
end
templates[lines] = {}
templates[lines]["x"] = line
line = file.readLine()
templates[lines]["y"] = line
line = file.readLine()
color = line
print(templates[lines]["x"])
mon.setCursorPos(templates[lines]["x"], template[lines]["y"])
mon.setBackgroundColor(colors.red)
mon.write(" ")
lines = lines+1
end
i error na 23 "expected number, number"
w pliku template pierwsza linijka zawiera wyłącznie cyfrę 1