two issues

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

Moderator: bsmorgan

two issues

Postby dewce » Wed Sep 13, 2006 10:45 pm

first pvplog won't upload to wowroster...

second, 0.5.2 is generating errors in wow

Count: 15
Error: Interface\AddOns\PvPLog\PvPLog.lua:1404: attempt to index field `guilds' (a nil value)
--------------------------------------------------
Count: 1
Error: Interface\AddOns\PvPLog\PvPLog.lua:1243: attempt to compare number with nil
--------------------------------------------------
Count: 8
Error: Interface\AddOns\PvPLog\PvPLog.lua:1275: bad argument #1 to `foreach' (table expected, got nil)


those are the errors i'm getting... so far, there have been a few others.
Attachments
pvplog.lua
(88.08 KiB) Downloaded 310 times
Last edited by dewce on Wed Sep 13, 2006 10:52 pm, edited 3 times in total.
dewce
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Tue Aug 29, 2006 11:06 pm

two issues

Postby dewce » Thu Sep 14, 2006 1:34 am

anyone?
dewce
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Tue Aug 29, 2006 11:06 pm

Re: two issues

Postby skinner927 » Thu Sep 14, 2006 5:34 am

same problems here. I keep getting errors, I decided to downgrade.
User avatar
skinner927
WR.net Apprentice
WR.net Apprentice
 
Posts: 9
Joined: Tue Aug 29, 2006 10:08 pm

two issues

Postby dewce » Thu Sep 14, 2006 7:33 am

downgrade to what?
dewce
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Tue Aug 29, 2006 11:06 pm

Re: two issues

Postby mrmuskrat » Sun Sep 17, 2006 12:08 am

dewce wrote:Error: Interface\AddOns\PvPLog\PvPLog.lua:1243: attempt to compare number with nil


dewce wrote:Error: Interface\AddOns\PvPLog\PvPLog.lua:1275: bad argument #1 to `foreach' (table expected, got nil)


dewce wrote:Error: Interface\AddOns\PvPLog\PvPLog.lua:1404: attempt to index field `guilds' (a nil value)


I'm surprised that more ppl don't report these. They have been in the code for a long time.

I think I have them all fixed. I'll have to test when I get back in game.
User avatar
mrmuskrat
WR.net Journeyman
WR.net Journeyman
 
Posts: 117
Joined: Sat Jul 29, 2006 9:50 pm

Re: two issues

Postby x00m » Tue Sep 19, 2006 6:50 pm

I found a fix for it.

The reason you get this error is because the array (or in this case known as a: table) doesn't contain any information.

Now, why wouldn't it contain any information? Well if you haven't used PvPlog before (or used an old version), you probably have a completely fresh logfile or whatever (with data: nil).

Run a:

/pl reset confirm
and it should fix itself.

For the coder:
You need to make sure that the array always contains information.

(one solution might be as simple as adding zeros to that array. Just make sure this isnt some auto-shit so old users logs get overwritten)

Common programming error I would say, and nothing to worry about :)
Last edited by x00m on Tue Sep 19, 2006 6:55 pm, edited 3 times in total.
x00m
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Tue Sep 19, 2006 6:45 pm

two issues

Postby mrmuskrat » Wed Sep 20, 2006 4:55 am

Right. I might be able to massage the data so that this never occurs but it seemed easier to handle the nil cases so that the error is never raised.

For example, this
Error: Interface\AddOns\PvPLog\PvPLog.lua:1404: attempt to index field `guilds' (a nil value)
is caused by an attempt to loop through all the data in an empty table. The fix is to only try to process the table if it is not empty.
Code: Select all
   if (table.getn(PvPLogData[realm][player].guilds) > 0) then
User avatar
mrmuskrat
WR.net Journeyman
WR.net Journeyman
 
Posts: 117
Joined: Sat Jul 29, 2006 9:50 pm

two issues

Postby mrmuskrat » Wed Oct 04, 2006 7:34 am

Has this been resolved?
User avatar
mrmuskrat
WR.net Journeyman
WR.net Journeyman
 
Posts: 117
Joined: Sat Jul 29, 2006 9:50 pm


Return to PvPLog

Who is online

Users browsing this forum: No registered users and 0 guests

cron