This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
[solved] [worth a read] disk.getDiskID() - nil?!
Started by LBPHacker, 17 February 2013 - 11:18 PMPosted 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
Posted 18 February 2013 - 12:20 AM
so if you do
print( tostring( disk.getDiskID ) )
it prints nil?
Have you tried rebooting the computer?
print( tostring( disk.getDiskID ) )
it prints nil?
Have you tried rebooting the computer?
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.
Posted 18 February 2013 - 12:24 AM
Odd… very odd indeed… Server? CC version? Minecraft mod pack?Yes, it prints nil. And yes, I have. disk.getDiskID doesn't point to anything. It's simply nil.
Posted 18 February 2013 - 12:25 AM
SSP, 1.481, own (only RedPower, ComputerCraft and MiscPeripherals)
Posted 18 February 2013 - 12:38 AM
ok so try reinstalling CC …SSP, 1.481, own (only RedPower, ComputerCraft and MiscPeripherals)
but before that try this
print( type( disk ) )
whats that output?Posted 18 February 2013 - 12:42 AM
table (what a surprise) - btw already thought of that
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?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.
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.
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 :)/>