Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Zeldri

Members
  • Content Count

    3
  • Joined

  • Last visited

About Zeldri

  • Rank
    Junior Member

Contact Methods

  • Minecraft
    Zeldri
  1. Ok so I dont know why but now I receive all the data but the problem is that I receive nil when I'm using it on my program But On my program i got a nil value There is my code local comp = require("component") local term = require("term") local colors = require("colors") local event = require("event") local gpu = comp.gpu local m = comp.modem gpu.setResolution(100,31) local w,h = gpu.getResolution() os.sleep(1) m.open(118) m.broadcast(118) while true do gpu.setBackground(0x202020) gpu.fill(1,1, w, h, " ") gpu.setBackground(0x606060) gpu.fill(1, 1, 2, h, " ")
  2. Is that possible to send multiple variables with comp.modem.send() ? Because I want to send like that : function sendMsg(type,data,data2,data3) m.open(118) m.send(address,118,type,data,data2,data3) end And i call the function like that : sendMsg("ReacteurInfo",pct(),cube.getEnergy(),cube.getMaxEnergy()) The problem is that the second variable isn't being send ( the third too ) same if i put cube.getEnergy() before, (in this case only cube.getEnergy() is being send and vise-versa) But when I want to send 2 or 3 string it's working perfectly sendMsg("ReacteurInfo"
  3. I didn't find a way to replace those addresses, but if u want to get an address easily, you have the sender(s) and the server which receive the message, but the sender need an address, so at the beginning of the infinite loop I put a component.modem.open(urport) _,_,address = event.pull("modem_message") function sendMsg(data,data2,data3) component.modem.send(address,port,data1,data2,data3) end And in the server which receive, you put in the infinite loop : component.modem.open(port) compoment.modem.broadcast(port) Of course replace port by ur port ^^ It's not the best wa
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.