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

Getting a Pocket C ID from a disk drive

Started by gril002, 01 June 2016 - 07:01 PM
gril002 #1
Posted 01 June 2016 - 09:01 PM
I was wondering how I could get the ID of the Pocket Computer in the disk drive. I tried disk,getID() but that just returns nil
KingofGamesYami #2
Posted 01 June 2016 - 09:16 PM
I don't think you can.

The CC wiki has this page which shows all the exposed methods for disk drive peripherals. One of them is this:
disk.getID(string side)
So I assume that might work. I think you have to specify the side the disk drive is on for it to work. Or the network ID if it is connected via a wired network.

I tried that in game.
Edited on 01 June 2016 - 07:28 PM
Emma #3
Posted 01 June 2016 - 09:25 PM
The CC wiki has this page which shows all the exposed methods for disk drive peripherals. One of them is this:
disk.getID(string side)
So I assume that might work. I think you have to specify the side the disk drive is on for it to work. Or the network ID if it is connected via a wired network.
Edited on 01 June 2016 - 07:26 PM
gril002 #4
Posted 01 June 2016 - 09:32 PM
Like I said it returns nil
Emma #5
Posted 01 June 2016 - 09:38 PM
Like I said it returns nil

Ah, just read closer in the wiki and it says:
Returns: the disk ID, or nil if the drive does not contain a Floppy Disk
Which in this case, it is not a floppy disk, so it returns nil. I guess there is no way to get the ID.
Sorry.
Edited on 01 June 2016 - 07:38 PM
Bomb Bloke #6
Posted 02 June 2016 - 02:37 AM
It strikes me that this might be worth adding to the mod, so I've shunted the thread over from AaP to Suggestions.
gril002 #7
Posted 02 June 2016 - 07:53 PM
Thanks really apreciate it. How soon can I expect if it gets aproved?
apemanzilla #8
Posted 02 June 2016 - 08:58 PM
Thanks really apreciate it. How soon can I expect if it gets aproved?

Within the next version. We don't know how soon a new release is going to be out, so you'll just have to wait and see.