This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Ridous's profile picture

Keep getting unknown symbol error

Started by Ridous, 14 August 2012 - 01:03 AM
Ridous #1
Posted 14 August 2012 - 03:03 AM
I keep getting an unknown symbol error on line 49 in this code
Spoiler

lastvalue = {}
count = {}
color = {}

color[1]="  Dirt	  "
color[2]="  Cobble	"
color[3]="  Gravel	"
color[4]="  Redstone  "
color[5]="  Coal	  "
color[6]="  Uranium   "
color[7]="  Nikolite  "
color[8]="  Diamond   "
color[9]="  Lapis	 "
color[10]="  Tungsten  "
color[11]="  Iron	  "
color[12]="  Silver	"
color[13]="  Copper	"
color[14]="  Tin	   "
color[15]="  Gold	  "
color[16]=""

for i = 1, 15 do
lastvalue[i] = false
count[i] = 0
end

while x ~= "end" do
	for i = 1, 15 do
	y = rs.getBundledInput("back")

	if lastvalue[i] == false and colors.test(y, 2^(i-1)) then
	count[i] = count[i] +1
	lastvalue[i] = true
	end
	if lastvalue[i] == true and colors.test(y, 2^(i-1)) == false then
	lastvalue[i] = false
	end
	end

	sleep (0.01)
	term.clear()

print("Ore 	   |Ore Count	 ")
print("------------|--------------")

for i = 1, 9 do

y = rs.getBundledInput("back")
print(, color[i], "|",count[i],) --right here
end
for i = 10, 15 do
y = rs.getBundledInput("back")
print(, color[i], "|",count[i],)
end
end

Noodle #2
Posted 14 August 2012 - 03:13 AM
print(, color, "|",count,) –right here
replace with print(color, "|", count)
ardera #3
Posted 14 August 2012 - 07:23 AM
EDIT: too slow…