Skip to content

rednet.recieve bug #1529

Answered by SquidDev
HappyYoyo09 asked this question in Q&A
Jul 20, 2023 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Oh gosh, I'm not sure where you got that code from, but it's horribly garbled. It's missing a couple of pretty key bits. This is what the code should look like:

rednet.open() -- <- Note the extra ) here. () indicates you're calling the function
--the rednet api returns the id of the computer
-- sending the message, then the message.
--this saves the id variable as "id" and the message
--as "message"
id,message=rednet.recieve() <-- Again, we need a () here to actually call the function.
print(id)
print(message)

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@SquidDev
Comment options

Answer selected by SquidDev
@HappyYoyo09
Comment options

@fatboychummy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area-CraftOS This affects CraftOS, or any other Lua portions of the mod.
3 participants
Converted from issue

This discussion was converted from issue #1528 on July 20, 2023 19:52.