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

Simple peripheral problems...

Started by zedekblue, 14 May 2013 - 05:18 PM
zedekblue #1
Posted 14 May 2013 - 07:18 PM
Title: Simple peripheral problems…

So… I thought I knew exactly what I was doing. It's some really simple code. But no matter how many times I look through this, I don't see what I'm doing wrong. Can anybody help?

EDIT:
I FIXED IT
Apparently my server lied to me about my name not having a capital letter. What a jerk.

xKYLERxx #2
Posted 24 July 2013 - 10:37 PM
Just to make your life easier in the future, type
help pastebin
into a computer.

Good luck!
xKYLERxx
theoriginalbit #3
Posted 24 July 2013 - 10:47 PM
I FIXED IT
Apparently my server lied to me about my name not having a capital letter. What a jerk.
For future reference I like to suggest to people making these kinds of programs to do the following…


local whitelist = {
  ["alllowercasename"] = true,
  ["anotherperson"] = true,
  --# etc
}

rednet.open("right")

while true do
  local e, p = os.pullEvent("player")
  if whitelist[p:lower()] then --# lowercase the name we get, and check it it's in the whitelist
    --# broadcast and print their capitalised name
    rednet.broadcast(p)
    print(p)
  end
end