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

bios:338: [string "BlackAPI"]:2: 'do' expected. but i have a do!

Started by AndreWalia, 06 December 2012 - 12:16 PM
AndreWalia #1
Posted 06 December 2012 - 01:16 PM

function slowPrint(EoiL,ElkO)
  for i = 1,EoiL# do
    write(EoiL[i])
    sleep(ElkO)
  end
end
im trying to make a slow print function because the defualt one is too fast for me. I think the problem is EoiL# part. if it is then how do i split a string into a table?
Cranium #2
Posted 06 December 2012 - 01:41 PM

for i = 1,EoiL# do
--needs to be
for i = 1,#EoiL do
I assume you are getting the number of indexes in a table?
AndreWalia #3
Posted 06 December 2012 - 01:57 PM

for i = 1,EoiL# do
--needs to be
for i = 1,#EoiL do
I assume you are getting the number of indexes in a table?
Haha beginner mistake! the # is before the table :P/>