jdf221 / CC-WirelessPeripheral

An implementation of the Computer Craft peripheral API allowing the use of wireless modems
MIT License
13 stars 4 forks source link

Cant wrap peripherals #11

Closed Lautarosco closed 4 months ago

Lautarosco commented 4 months ago

Maybe I am doing something wrong, but I cant seem to wrap a peripheral wirelessly.

I can get the wireless peripherals with peripheral.getNames() image

But when using peripheral.wrap I get a nil value (with debugging, I can see that it tries to use a native peripheral since it doesn't find a remote one)

image

jdf221 commented 4 months ago

I have to refresh myself on how this thing works every time someone asks a question about this lol.

My immediate thought is that you need to use the full "wpp@" string for the wrap argument, not just the "monitor_0"

That full "peripheral path" is how it knows what computer the real peripheral is connected to. The 5 in the string refers to the computer ID that the peripheral is connected to.

Lautarosco commented 4 months ago

Omg can't believe you answered so quicly. You are right, I should use the real string. Was checking it but you answered before I could lol

jdf221 commented 4 months ago

Haha, the magic of email notifications and the GitHub phone app.

Happy it works for you! I find it so cool that people actually use this random thing I made.