Jump to content




Lava pump


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

#1 Blade2277

  • New Members
  • 2 posts

Posted 17 April 2016 - 12:32 AM

Hello. I am trying to make a wireless detector in tekkit lite to see if my nether pumps are activated. i am having trouble getting the signal to transmit, however. Could someone go over my code and see if there is any mistakes? Thanks.
Receiving end:
rednet.open ("top")
rednet.receive()
end
os.pullEvent(modem.message)
if param4 == ("1") true then
print ("LAVA PUMPS ACTIVE")
else
print ("LAVA PUMPS DEACTIVATED/MISSING")
end

Broadcasting end:
rednet.open ("left")
if redstone.getInput ("bottom") == true then
rednet.broadcast (1)
end


#2 The_Cat

  • Members
  • 119 posts

Posted 17 April 2016 - 09:31 AM

What are the errors you are getting? (what lines do they occur on?)
From what I can see:
You have a random 'end'. (are you giving us all the code?)
You are using a rednet.receive() and os.pullEvent(). They can both be used to receive messages from another computer and they both return values. (Click for rednet.receive wiki Click for os.pullEvent() wiki)
os.pullEvent(modem.message) should have quotes in it: os.pullEvent("modem.message") (look at os.pullEvent() wiki)
You are also missing a 'param4' variable which is not declared (I presume it is meant to be returned my the os.pullEvent("modem.message")) (look at os.pullEvent() wiki)

If you have any questions, ask.

Edited by The_Cat, 17 April 2016 - 09:33 AM.


#3 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 17 April 2016 - 02:19 PM

Also, modem.message isn't an event name. "modem_message" is.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users