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

java.lang.ArrayIndexOutOfBoundsException

Started by meeko011, 09 April 2017 - 01:54 AM
meeko011 #1
Posted 09 April 2017 - 03:54 AM
https://pastebin.com/UPnj9jJM, here is the code. Takes two arguments, length and height, then builds a wall. I also used modulus to solve some problem I remember having, which may not even exist for this program. Returns the error I put in the title, after moving up. This is the FTB Ultimate modpack.
Bomb Bloke #2
Posted 10 April 2017 - 01:53 AM
Of the top of my head, it'd be line 29:

    if turtle.select(turtle.getSelectedSlot() + 1) then

This may attempt to target a slot which doesn't exist.

If that's not it, and your error truly doesn't include a line number, then add print statements to your script until you've narrowed down the exact line which is triggering it.