Error while /pl pvp

Forum Dedicated to PvPLog, (The WoW PvP data collector addon), and PvPLog related topics

Moderator: bsmorgan

Error while /pl pvp

Postby Suyu » Wed Nov 01, 2006 8:39 pm

Hi,
I recently installed latest PvPLog version in WoW. All run, but when I want to see global overview of my stats, by typing /pl pvp, I've this error :
Interface/AddOns/PvPLog/PvPLogUI.lui : 301 attempt to concatenate field 'realm' (a nil value)


Else, i just want to say that PvPLog report inside chat box is not so beautiful... :X

Thank you.
Suyu
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Wed Nov 01, 2006 8:28 pm

Re: Error while /pl pvp

Postby Atolicus » Tue Nov 07, 2006 9:03 pm

Most likely what happened here is that PvPLog attempted to pull the realm information and failed.
This is partly my fault as I suggested pulling the realm information when pulling the name since the UnitName("Unit") function provides both and there were user requests for this information to be including since we now have cross-realm battlegrounds. What I forgot is that this function can return NIL for realm...

When using the UnitName("Unit") function:
- If from your own realm, then realm == nil.
- The realm return will be nil even if the player is from a different realm, if it is out of visible range.

A validation check needs to be added to verify that a realm has been pulled and if not, that some alternate information is stored in it's place.

Something like this should work:
Before each
Code: Select all
PvPLogRecord(v.name, v.level, v.race, v.class, v.guild, 1, 0, fullrank, v.realm);

add the following
Code: Select all
if(v.realm == NIL) then
     v.realm = "Unknown";
end



Atolicus
User avatar
Atolicus
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Sep 18, 2006 9:35 pm

Re: Error while /pl pvp

Postby zeryl » Tue Nov 07, 2006 11:11 pm

Wouldn't it be best to make it the name of your realm rather than saying unknown for all of them? Especially since Blizzard decided it would be better to return Nil rather than your realm name.

I don't know a good way to really determine the difference between the two, other than some sort of range check (using a max-range spell), and from there determine if they are "out-of-sight" for setting realm name.
User avatar
zeryl
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 194
Joined: Tue Jul 04, 2006 12:59 pm
Location: Saint Louis

Re: Error while /pl pvp

Postby Atolicus » Thu Nov 09, 2006 8:52 am

zeryl wrote:Wouldn't it be best to make it the name of your realm rather than saying unknown for all of them? Especially since Blizzard decided it would be better to return Nil rather than your realm name.

I don't know a good way to really determine the difference between the two, other than some sort of range check (using a max-range spell), and from there determine if they are "out-of-sight" for setting realm name.



Actually, under the current system you may be correct.
Since the target is selected using TargetByName("name", exactMatch) we run into this possibility:
If there is no close match available then an error message is displayed (Error event?) and the target is left unchanged.
which means we are likely only picking the correct target when they are in visible range which also means there is a high probability that any NIL returns for the realm are the result of players being on the same server so the code would make more sense as:

Code: Select all
if(v.realm == NIL) then
     v.realm = realm;
end


However, this may all be mute point anyway since the system needs to be changed to pull the information without using the TargetByName("name", exactMatch) function as this will no longer work in combat post-BC
---
User avatar
Atolicus
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Sep 18, 2006 9:35 pm

Re: Error while /pl pvp

Postby Trademark » Thu Nov 30, 2006 10:06 am

I get the same error as Suyu and the posted fix doesnt work.
Trademark
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Thu Nov 30, 2006 9:19 am

Re: Error while /pl pvp

Postby bsmorgan » Mon Dec 25, 2006 9:27 pm

I believe this is fixed in PvPLog 2.1.0
User avatar
bsmorgan
WoW Interface Developer
WoW Interface Developer
 
Posts: 160
Joined: Tue Nov 28, 2006 10:17 pm
Location: Colorado Springs, Colorado


Return to PvPLog

Who is online

Users browsing this forum: No registered users and 0 guests

cron