Page 2 of 3
Re: party.lua bugs
Posted: Sun Jul 15, 2012 5:45 am
by pman
lisa wrote:So it works sometimes but not all the time?
Some of my chars work most of the time (the 3 "good" ones), but sometimes they bug, after a restart of client they work again.
And i have chars, which never worked until now, tried several times, with and without restart, no chance.
Re: party.lua bugs
Posted: Sun Jul 15, 2012 6:06 am
by pman
2 chars, dist == 0
Code: Select all
(1)
Party member 1 has the name of Char2
(2)
Party member 1 has the name of Char2
1 has name of Char1
(3)
Player has the name of Char1
Party member 1 has name of Char2
(4)
check party 100 is false
(5)
check party 200 is false
names ok, but false
Re: party.lua bugs
Posted: Sun Jul 15, 2012 6:59 am
by lisa
I am at a loss, I can't think of anything to make it work on some chars and not others except for the actual names of them.
Re: party.lua bugs
Posted: Sun Jul 15, 2012 7:03 am
by pman
correct me if i am wrong, but (3) looks as it should be and (2) misses 1 char or not?
Re: party.lua bugs
Posted: Sun Jul 15, 2012 7:19 am
by lisa
(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 =)
Re: party.lua bugs
Posted: Sun Jul 15, 2012 7:26 am
by pman
somewhere a bug in the new file
Re: party.lua bugs
Posted: Sun Jul 15, 2012 7:34 am
by lisa
missed an "end", at work atm so can't test it.
try this
Re: party.lua bugs
Posted: Sun Jul 15, 2012 7:43 am
by pman
same 2 chars as before (dist==0)
Code: Select all
(1)
no output
(2)
Party member 1 has the name of Char2
1 has name of Char1
(3)
Player has the name of Char1
Party member 1 has name of Char2
(4)
check party 100 is false
(5)
check party 200 is false
Re: party.lua bugs
Posted: Sun Jul 15, 2012 7:47 am
by lisa
(1)
no output
(1) should be printing atleast the name of the player.
K added some more prints to (1) so it prints atleast something, if nothing at all printed then the keypress is in cooldown.
Re: party.lua bugs
Posted: Sun Jul 15, 2012 7:51 am
by pman
Code: Select all
(1)
about 20 times:
Looking for players in range
finished looking
Re: party.lua bugs
Posted: Sun Jul 15, 2012 7:57 am
by pman
Re: party.lua bugs
Posted: Sun Jul 15, 2012 8:16 am
by lisa
Slaps forehead, I had
if obj.Type == "PT_PLAYER" then
when it should be
if obj.Type == PT_PLAYER then
tested and works fine now.
Maybe your client is all messed up, did you ever try a fresh install?
Re: party.lua bugs
Posted: Sun Jul 15, 2012 8:20 am
by pman
Code: Select all
(1)
about 20 times:
Looking for players in range
Char2 found
Char1 found
Char1 found
finished looking
the rest is the same, check is false
Re: party.lua bugs
Posted: Sun Jul 15, 2012 8:22 am
by pman
tried it with a char with umlauts now, to address this problem too, with (1) the name was fine, with (2) and (3) the umlauts got scrambled.
Re: party.lua bugs
Posted: Sun Jul 15, 2012 8:23 am
by lisa
Then it seems to me that the "name" from (UI) memory isn't matching the "name" from object memory.
I am back to thinking it is a language (character) issue.
Do the MM prints match what you see when you look at the names in game?
Re: party.lua bugs
Posted: Sun Jul 15, 2012 8:36 am
by pman
(1) looked like in game
(2)(3) scrambled
Update: furthermore (2)(3) somehow stores the old values, i changed char2 (with umlauts) in another char2 (without umlauts), (1) worked fine, (2)(3) looked like a much more scrambled version of the char2 name with umlauts, and not the new char2 name without umlauts.
Re: party.lua bugs
Posted: Sun Jul 15, 2012 8:56 am
by pman
restarted all clients
2 chars with english names:
Code: Select all
(1)
about 20 times:
Looking for players in range
Char1 found
Char2 found
finished looking
(2)
Party member 1 has the name of (totally scrambled text)
1 has name of Char1
(3)
Player has the name of Char1
Party member 1 has name of (totally scrambled text, same as with (2))
(4)
check party 100 is false
(5)
check party 200 is false
Re: party.lua bugs
Posted: Sun Jul 15, 2012 9:26 am
by CNKTHoward
Why does the checkparty have to use adresses anyway? Can't one check if a partymember is in range with
If you get a target, the partymember is there - then clear the target with
and check for the next one.
Re: party.lua bugs
Posted: Sun Jul 15, 2012 9:43 am
by lisa
That would work if you only wanted to check if party members were within 450 yards. We want it to work within a set distance.
It is food for thought though on another way to handle it but I don't have any issues with the current code, so trying to determine if it's a language issue or a specific issue with pman's client.
--=== Edit ===--
You can do the same with just keypresses F1 F2 F3 F4 F5 F6
Also the current checkparty code works for an entire Raid, so 50 chars (seige) or 36 normal raid.
Re: party.lua bugs
Posted: Sun Jul 15, 2012 10:26 am
by lisa
pman wrote:(1) looked like in game
(2)(3) scrambled
Update: furthermore (2)(3) somehow stores the old values, i changed char2 (with umlauts) in another char2 (without umlauts), (1) worked fine, (2)(3) looked like a much more scrambled version of the char2 name with umlauts, and not the new char2 name without umlauts.
(2) calls partytable which "clears" the table at the start
partymemberpawn={}
local partymemberName={}
local partymemberObj={}
I really don't see how it could have old info in it.
Do you hold down the keys or just do a quick press?
I noticed with (1) if I hold the key down it spams the code constantly, was still accurate for me though.
Actually
(2)
Party member 1 has the name of (totally scrambled text)
That name should have been gotten directly from the Memory I suspect as the UI, try removing all addons except for the ingamefunctions and start up client again. It is possible an addon is messing with it.