Jump to content




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


  • You cannot reply to this topic
9 replies to this topic

#1 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

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

#2 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 18 February 2013 - 12:20 AM

so if you do

print( tostring( disk.getDiskID ) )

it prints nil?

Have you tried rebooting the computer?

#3 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

Posted 18 February 2013 - 12:23 AM

View PostTheOriginalBIT, on 18 February 2013 - 12:20 AM, said:

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.

#4 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 18 February 2013 - 12:24 AM

View PostLBPHacker, on 18 February 2013 - 12:23 AM, said:

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?

#5 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

Posted 18 February 2013 - 12:25 AM

SSP, 1.481, own (only RedPower, ComputerCraft and MiscPeripherals)

#6 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 18 February 2013 - 12:38 AM

View PostLBPHacker, on 18 February 2013 - 12:25 AM, said:

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?

#7 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

Posted 18 February 2013 - 12:42 AM

table (what a surprise) - btw already thought of that

#8 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 18 February 2013 - 12:43 AM

View PostLBPHacker, on 18 February 2013 - 12:42 AM, said:

table
for k,v in pairs(disk) do
  print(tostring(k).." = "..tostring(v))
end
and is there anything that prints here?

#9 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

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.

#10 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

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 :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users