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

Error:62 Attempt To Index Nil Value

Started by jay5476, 30 August 2013 - 11:25 PM
jay5476 #1
Posted 31 August 2013 - 01:25 AM
i get this when I clearly define all variabes it uses bit it still shows error: 62: attempt to index nil value code is here: http://pastebin.com/UMZcz4cL I have put in print(varName) and it works fine
Edited on 30 August 2013 - 11:27 PM
Grim Reaper #2
Posted 31 August 2013 - 01:42 AM
You're calling countSurround with the width of the table, so when you try to index map[width + 1][y], there is no element at index width + 1. You'll need to check for that.