Rare Spawn
Well-known member
- Joined
- Oct 10, 2022
- RedCents
- 3,282¢
Hello experts, journeymen and fellow novices. I am trying to write a Lua function that will check if all DanNet peers are within a given (range). It appears the output of the highlighted TLO is a string and not multiple objects, what is the proper method to get where I am trying to go? The reason I am avoiding the mq.TLO.Group.Members() is because the group can have unpredictable humans in it from time to time, so I want to exclude them from check if they are in range or not.
[CODE lang="Lua" title="Broken Lua function" highlight="2"]function BotsNotInRange(range)
Bots = {mq.TLO.DanNet.Peers()}
for i,v in ipairs(Bots) do
print(v)
if mq.TLO.Group.Member(v).Distance() > range then
print('\ar'..v..' not in range.')
return true
end
end
end[/CODE]
Thanks in advance.
[CODE lang="Lua" title="Broken Lua function" highlight="2"]function BotsNotInRange(range)
Bots = {mq.TLO.DanNet.Peers()}
for i,v in ipairs(Bots) do
print(v)
if mq.TLO.Group.Member(v).Distance() > range then
print('\ar'..v..' not in range.')
return true
end
end
end[/CODE]
Thanks in advance.



