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

Error:106 Attempt To Call Nil

Started by jay5476, 30 August 2013 - 04:24 PM
jay5476 #1
Posted 30 August 2013 - 06:24 PM
hi, in my code it seems to be erroring at 106: attempt to call nil but removing line 98 seems to fix the problem so is it causing it(I want to keep line 98)
the code can be found here: http://pastebin.com/gtuavuba
Engineer #2
Posted 30 August 2013 - 06:59 PM
checkSurround is not defined on line 98
jay5476 #3
Posted 30 August 2013 - 11:52 PM
now i get this error: 62: attempt to index nil value new code is here: http://pastebin.com/UMZcz4cL
Engineer #4
Posted 31 August 2013 - 08:07 PM
now i get this error: 62: attempt to index nil value new code is here: http://pastebin.com/UMZcz4cL
What did you exactly do to get this error. I cannot reproduce it
Zudo #5
Posted 01 September 2013 - 05:10 AM
I would assume that the h variable is not defined, but it is :(/>
imthe666st #6
Posted 01 September 2013 - 07:45 AM
Found a Bug: If you flag a mine with right click: Then Left click the mine. It makes the mine disappear and shows the number of nearby mines
But i didn't notice the error you had
now i get this error: 62: attempt to index nil value new code is here: http://pastebin.com/UMZcz4cL
jay5476 #7
Posted 01 September 2013 - 06:00 PM
okay guys I have solved it by definying the map first then running setfield and @imthe666st I don't know if I want to keep that 'feature' as it is coded that if you flag a spot in the table it will be set 'flag' and if 'mine' was there it is overridden I have done it like this so if a player flags all mines my check will find no mines and you will win