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

rednet:87: error in coding

Started by OracleVM, 24 May 2014 - 12:30 PM
OracleVM #1
Posted 24 May 2014 - 02:30 PM
Hello! My name is OracleVM (VistaWiz on Minecraft) and it appears I'm having a bit of an issue. After following slightly off two programs, I am creating a "SEND" program, which allows you to send Rednet messages with ease, and as I try to start the program, I get the dreaded rednet:87:. Here is the code to my program: (Sorry if I don't know how to put the code in an organized box, I am new to the forms ;)/>)




local modemside = "right"
local receiverId, message = rednet.send()
——————————————————-
term.clear()
term.setCursorPos(1,1)
print("P2P CHAT 3.1")
pint("Type quit to stop")
while do true
wit("Enter ID: ")
id= io.read()
if id= "quit" then
break
else
write("Enter Messeage: ")
message = io.read()
if message = "quit" then
break
else
rednet.send(id, message)
end
end
end


Is there something missing, or is the code incorrect? Reply back ASAP. Thank you.
CCJJSax #2
Posted 25 May 2014 - 01:42 AM

print("these are code tags.")
-- don't use spaces between the brackets
-- [ code]  
-- <your code here>
--  


You have several spelling errors.

this is your code below
Spoiler

local modemside = "right"
local receiverId, message = rednet.send()
-------------------------------------------------------
term.clear()
term.setCursorPos(1,1)
print("P2P CHAT 3.1")
pint("Type quit to stop") -- mispelled print
while do true -- it's supposed to be while true do'
  wit("Enter ID: ") -- what the heck is wit?
  id= io.read()
  if id= "quit" then -- you need == not =
	break
  else
	write("Enter Messeage: ")
	message = io.read()
  -- you are missing an end here.
  if message = "quit" then
	break
  else
	rednet.send(id, message)
  end -- this end should be above.
  end
end

Try to change those things and post your new code and any errors that come up.
Edited on 24 May 2014 - 11:44 PM
theoriginalbit #3
Posted 25 May 2014 - 01:45 AM
-snip-
the easier way to show code tags is like so
[code][/code]
the way you showed how to do code tags was, well, confusing to say the least!
CCJJSax #4
Posted 25 May 2014 - 02:02 AM
-snip-
the easier way to show code tags is like so
[code][/code]
the way you showed how to do code tags was, well, confusing to say the least!

[code]Ah, I have been trying to figure out a better way to do this! Thanks![/code]
Edited on 25 May 2014 - 12:03 AM