Jump to content




Error:62 Attempt To Index Nil Value


  • You cannot reply to this topic
1 reply to this topic

#1 jay5476

  • Members
  • 289 posts

Posted 31 August 2013 - 12: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 by jay5476, 31 August 2013 - 12:27 AM.


#2 Grim Reaper

  • Members
  • 503 posts
  • LocationSeattle, WA

Posted 31 August 2013 - 12: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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users