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

MinerSebas

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. Unfortunely qou miss understude. Yes a have two door system, but it is not like a airlock. I wanted it also to be expandebele as much as i want. My problem was that i waitet the first PC to ask at server. Meaning that i could only work with my second pc if the first one was activated and finished. With this current code iteration I could circumvent all my problems: local password = "12345" local client_number = 1 local list = {} local tempport = 1 function OpenModem (index) index = index * 10 modem.open(index+1) modem.open(index+3) list[client_number] = index client_number = cl
  2. I have finally made it work with this code: function server (index) modem.open(2001) modem.open(3001) _,_,_,port,_,signal = event.pull("modem_message") modem.close(2001) modem.close(3001) gpu.set(1,10,tostring(port)) signal = serialization.unserialize(signal) gpu.set(1,1,tostring(source).." did send: "..signal) if signal == password then ColorSet(1,0xFF6600) gpu.set(1,2,"Password accepted") modem.broadcast(port + 1,"true") gpu.set(1,11,"Answer send") while true do modem.open(port+2) _,_,_,port_1,_,signal = event.pull("modem_message")
  3. I tried to steamline my network code. This is what i wrote function server (index) index10 = index *10 modem.open(index10 + 1) _,source,_,_,_,signal = event.pull("modem_message") modem.close(index10 + 1) signal = serialization.unserialize(signal) gpu.set(1,1,tostring(source).." did send: "..signal) if signal == password then ColorSet(1,0xFF6600) gpu.set(1,2,"Password accepted") modem.send(source,index10 + 2,"true") while true do modem.open(index10 + 3) _,source1,_,_,_,close = event.pull("modem_message") modem.close(index10 + 3) if source1 == source
  4. Thanks for the help. I will try it als fast as possible. For the Second question: i want my light Board to be another Color, when the door is Open. To synch it with my Client, I am not using os.sleep, but I wait for a Message in Port 2003. The Problem in my Code is, that i have to wait for the door to close, so that i can leave the if statement. So when i want to interact with my Second pc, i have to wait, until I Know that my First door has closed.
  5. I am not a expert in lua, but I think tables dont have the function (?) getn, maybe something else from computercraft. The wiki states: The Link goes to a lua manuel. it list the functions .concat, .insert, .pack, .remove, .sort and .unpack. I think what you are search for is .unpack I hope this helped.
  6. I have seen, that you also made a documentation for the advanced cipher from compotronics. Could it be possible that you make this for all other computronics blocks/items, that are missing inits own wiki?
  7. Explenation: Main Question: I want to write a centrel OC program, that acts as a central login for severel ComputerCraft controled Doors, similarly to this one, but on my own accord. I achievd that only those Doors open, where I gave my password, but the problem is, that I can only do it in a specific order. First the first PC, then the second and the may use the first again. Is there a way to make it possible to open the doors in any order? Second minor question: I am using a light board from computertronics in my server Rack to see the status of the doors (change in colo
×
×
  • Create New...

Important Information

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