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

[1.64] turtle.getItemDetail does not error without parameters!

Started by KingofGamesYami, 28 September 2014 - 07:42 PM
KingofGamesYami #1
Posted 28 September 2014 - 09:42 PM
VERSION:
1.64
DESCRIPTION:
turtle.getItemDetail did not error
EXPECTED RESULT:
Calling turtle.getItemDetail without any parameters it errors, saying it expected a number
REPRODUCTION STEPS:
1. Place turtle
2. create this program:

local item = turtle.getItemDetail()
3. run it
SCREENSHOT/VIDEO:
N/A
TurtleHunter #2
Posted 28 September 2014 - 09:51 PM
When you run it without parameters, it checks the selected slot. Check Dan tweet
KingofGamesYami #3
Posted 28 September 2014 - 09:54 PM
When you run it without parameters, it checks the selected slot. Check Dan tweet

Ah, didn't know that. Annoying for debugging though…
TurtleHunter #4
Posted 28 September 2014 - 10:17 PM
When you run it without parameters, it checks the selected slot. Check Dan tweet

Ah, didn't know that. Annoying for debugging though…
Just create a dummy function replacing turtle.select that stores what slot is selected
KingofGamesYami #5
Posted 28 September 2014 - 10:53 PM
-snip-
Just create a dummy function replacing turtle.select that stores what slot is selected
No, I mean I put one in a for loop, and forgot to put in the parameter. Took me about 15 minutes to figure out why it wasn't working, since the error was in a different part of my script. (basically, I was attempting to locate certain items)
dan200 #6
Posted 29 September 2014 - 11:26 AM
Not a bug