Posted 31 January 2015 - 03:50 AM
Okay i have this Advanced Wireless Sensor Turtle that im going to (eventually) get to follow me a scan for nearby enemy player. Problem is that when i use this code.
rednet.open("right")
radar = peripheral.wrap("right")
while true do
user = radar.getPlayers()
if user ~= ("deathbysh33p") then
rednet.send(3,"Detected")
else
end
1.I see one problem is that since its following me it will always detect me which means it will always say there is noone near me.
2. It returns a table and for the life of me i cannot just get it to scan for usernames and use those instead of the table.
help?
I am playing on 1.7.10.
rednet.open("right")
radar = peripheral.wrap("right")
while true do
user = radar.getPlayers()
if user ~= ("deathbysh33p") then
rednet.send(3,"Detected")
else
end
1.I see one problem is that since its following me it will always detect me which means it will always say there is noone near me.
2. It returns a table and for the life of me i cannot just get it to scan for usernames and use those instead of the table.
help?
I am playing on 1.7.10.