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

[solved] [worth a read] disk.getDiskID() - nil?!

Started by LBPHacker, 17 February 2013 - 11:18 PM
LBPHacker #1
Posted 18 February 2013 - 12:18 AM
What's happened to disk.getDiskID? Lua says it's nil. I'm just confused because it's still listed here: Disk API
theoriginalbit #2
Posted 18 February 2013 - 12:20 AM
so if you do

print( tostring( disk.getDiskID ) )

it prints nil?

Have you tried rebooting the computer?
LBPHacker #3
Posted 18 February 2013 - 12:23 AM
so if you do

print( tostring( disk.getDiskID ) )

it prints nil?

Have you tried rebooting the computer?

Yes, it prints nil. And yes, I have. disk.getDiskID doesn't point to anything. It's simply nil.

It's seems like .getDiskID is deprecated or something like that.
theoriginalbit #4
Posted 18 February 2013 - 12:24 AM
Yes, it prints nil. And yes, I have. disk.getDiskID doesn't point to anything. It's simply nil.
Odd… very odd indeed… Server? CC version? Minecraft mod pack?
LBPHacker #5
Posted 18 February 2013 - 12:25 AM
SSP, 1.481, own (only RedPower, ComputerCraft and MiscPeripherals)
theoriginalbit #6
Posted 18 February 2013 - 12:38 AM
SSP, 1.481, own (only RedPower, ComputerCraft and MiscPeripherals)
ok so try reinstalling CC …

but before that try this

print( type( disk ) )
whats that output?
LBPHacker #7
Posted 18 February 2013 - 12:42 AM
table (what a surprise) - btw already thought of that
theoriginalbit #8
Posted 18 February 2013 - 12:43 AM
table

for k,v in pairs(disk) do
  print(tostring(k).." = "..tostring(v))
end
and is there anything that prints here?
LBPHacker #9
Posted 18 February 2013 - 12:45 AM
It prints function names and pointers

But hey :D/> I see what's the problem… There is no .getDiskID but there IS .getID! What the potato?! Nevermind, looks like it's the same as .getDiskID.
theoriginalbit #10
Posted 18 February 2013 - 01:04 AM
hmmm could have changed from that version and wiki is outdated. makes sense tho disk.getDiskID well what other id did I mean?! clearly i meant the disk, im using the disk api. so i can understand that change :)/>