Posted 04 September 2013 - 08:39 PM
I seem to be having a problem with this,
the error i'm getting is "Test:11: attempt to ndex ? (a nill value)
It seems to be with the actual sensor itself,When it detects a new player inside the radius
the error i'm getting is "Test:11: attempt to ndex ? (a nill value)
It seems to be with the actual sensor itself,When it detects a new player inside the radius
os.loadAPI("ocs/apis/sensor")
s = sensor.Wrap("top")
local function Discovery()
while true do
t = s.getTargets()
for name, basicDetails in pairs(t) do
local chars = s.getTargetDetails(name)
if chars.Name =="Player" then
print(name)
end
end
Discovery()