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

How do you get this working correctly as a list.

Started by miguemely, 29 September 2013 - 07:46 PM
miguemely #1
Posted 29 September 2013 - 09:46 PM
http://pastebin.com/E8seJG5x (server)

http://pastebin.com/w2kChL1U (client)

I have these two scripts, and I adapted it to what we were doing with OpenPeripherals and PlayerDetectors.
Now my question here is, how do I set it so on the server, it reads the list, and the client sends a player name, and if that player names matches one in the list, then do stuff.?

Thanks!
Miguel R.
Lyqyd #2
Posted 29 September 2013 - 10:33 PM
Split into new topic.
jay5476 #3
Posted 30 September 2013 - 09:29 AM
server code

names = {you,friend,another friend} --# put appropriate names
while true do
  id,msg,dis = rednet.receive()
  for key,name in pairs(names) do
     if msg == name then
      --# send info for client to do stuff

     end
  end
end
miguemely #4
Posted 30 September 2013 - 04:34 PM
Thanks jay!