(3) is directly from memory and I suspect it is the actual UI names on the party icons you see on screen as it works when they are also offline. The names remain on screen. So (3) should ALWAYS get all the names of your party members, I also added player name to 3 aswell
Code: Select all
if keyPressed(key.VK_NUMPAD3) and (os.time() - time > delay ) then
print("Player has name of "..player.Name)
for i = 1,5 do
if GetPartyMemberName(i) ~= nil then
print("Party member "..i.." has name of "..GetPartyMemberName(i))
end
end
print("")
time = os.time()
end
(2) on the other hand works differently.
it uses the object info direct from memory and will only have the info if the objects are actually within memory range. It uses the findnearestnameorid() function and uses the name that (3) would have gotten to find the actual object information.
(2)
Party member 1 has the name of Char2
1 has name of Char1
So this tells me that char2 is the other party member but it can't get the information for char2 directly from memory. "1 has name of" will be the player. So yes the info for Char2 is missing from the function.
So because it isn't getting the object information of Char2 then it has nothing to compare distance to and will always return false.
So we need to work out why Char2 isn't being found using findnearestnameorid()
Ok new WP tester, this time (1) will print all "player" names within memory range, so go somewhere quiet to get less prints =)