Grey Handling

Grey Handling

17.4k Downloads

Chat loot message incorectly parsed in chinese

swetlover opened this issue · 21 comments

commented

I am using the 0.5.2c version on the Chinese client. When my mage makes "Conjured Fresh Water" or "Conjured Bread", I get the following error:

2x ...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: table index is nil
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: in function `updatePlayersList'
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:24: in function `handleChatMessageLoot'
GreyHandling\GreyHandling-0.5.2c.lua:18: in function <GreyHandling\GreyHandling.lua:17>

Locals:
player_id = nil
player_name = ""
(*temporary) = <table> {
 PlayerID1AEBCFE1123123 = "TestName-TestServer"
}
(*temporary) = nil
(*temporary) = "table index is nil"
GreyHandling = <table> {
 NAME = "GreyHandling"
 IS_CLASSIC = true
 loot_frame = <unnamed> {
 }
 data = <table> {
 }
 OPTION_COMMAND = "/gho"
 DESCRIPTION = "Helps you get rid of the right grey objects when your bags are full"
 GetLocalization = <function> defined @GreyHandling\constants.lua:51
 SELL_PRICE_TEXT = "卖价:"
 options = <table> {
 }
 frame = <unnamed> {
 }
 DISPLAY_NAME = "Grey Handling"
 functions = <table> {
 }
}
commented

Ho, I think I might have added test data for the group's item tracking by mistakes, I'll be able to fix it very fast after 3PM GMT if this is the real problem. I'll take a look otherwise. Sorry for the inconvenience and thanks a lot for the bug report, it's really helpful!

commented

So... I released a fix (0.5.3c) but I'm absolutely not sure that I will fix your problem. I tried to reproduce with my mage but I don't have any problem with 0.5.2 nor 0.5.3. I don't have a mage that can create food on classic and I don't have a Chinese client to test either. Could you try to install 0.5.3c and copy-paste the error again if the problem still exists, please?

commented

When i loot a Excellent quality(green) items from mail, I get the following error:

12x ...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: table index is nil
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: in function `updatePlayersList'
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:24: in function `handleChatMessageLoot'
GreyHandling\GreyHandling-0.5.2c.lua:18: in function <GreyHandling\GreyHandling.lua:17>

Locals:
player_id = nil
player_name = ""
(*temporary) = <table> {
 PlayerID1AEBCFE1123123 = "TestName-TestServer"
}
(*temporary) = nil
(*temporary) = "table index is nil"
GreyHandling = <table> {
 NAME = "GreyHandling"
 IS_CLASSIC = true
 loot_frame = <unnamed> {
 }
 data = <table> {
 }
 OPTION_COMMAND = "/gho"
 DESCRIPTION = "Helps you get rid of the right grey objects when your bags are full"
 GetLocalization = <function> defined @GreyHandling\constants.lua:51
 SELL_PRICE_TEXT = "卖价:"
 options = <table> {
 }
 frame = <unnamed> {
 }
 DISPLAY_NAME = "Grey Handling"
 functions = <table> {
 }
}

And, mage makes "Conjured Fresh Water" or "Conjured Bread", I get the following error:

14x ...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: table index is nil
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: in function `updatePlayersList'
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:24: in function `handleChatMessageLoot'
GreyHandling\GreyHandling-0.5.2c.lua:18: in function <GreyHandling\GreyHandling.lua:17>

Locals:
player_id = nil
player_name = ""
(*temporary) = <table> {
 PlayerID1AEBCFE1123123 = "TestName-TestServer"
}
(*temporary) = nil
(*temporary) = "table index is nil"
GreyHandling = <table> {
 NAME = "GreyHandling"
 IS_CLASSIC = true
 loot_frame = <unnamed> {
 }
 data = <table> {
 }
 OPTION_COMMAND = "/gho"
 DESCRIPTION = "Helps you get rid of the right grey objects when your bags are full"
 GetLocalization = <function> defined @GreyHandling\constants.lua:51
 SELL_PRICE_TEXT = "卖价:"
 options = <table> {
 }
 frame = <unnamed> {
 }
 DISPLAY_NAME = "Grey Handling"
 functions = <table> {
 }
}

Maybe this Addons can't be used in Chinese client?

commented

My God, very unfortunate.
The first screenshot means that your server does not allow you to log in when you set the Chinese text language.
(I guess this is a server limitation and there is currently no way to deal with it. I am curious that Chinese clients can use English, but your client can't use Chinese.)
The second screenshot is not important at all. It means that you don't have access to the Arena server. You can follow the World of Warcraft Arena bidding information on the website.

commented

I have a similar message with the English server. Well, let's stay factual, and just state that they're refusing access to people based on their language of choice. I'm going to debug this with your debug log alone, it looks like the message for loot is a little different and there is also a change in the way the game store the character name (ie: no player_id). I'll keep you informed and probably will ask you to check the fix once it's done if you don't mind :)

commented

Feel free to contact me, thank you very much for creating this Addons.
I will reply to you as soon as possible.

commented

I removed the need to have the player_id in 0.6.11, so it might work better for Chinese players. This is blind debugging though. Could you update the addon and tell me if the problem still exists when you have the time, please?

commented

Now,when i loot any Greyitems,there is a message:
You never saw"Items name" looted by before so we can`t ask the wow API about it.

commented

Is this for every item, even those that you already looted once? If so, it's still buggy :) I have this message only when the item is not in the cache with the French client.

commented

Oh,sorry,you are right,This message will only appear when you loot an item at the first time.

commented

Wow, I'm so relieved! Thanks a lot for your help, could not have fixed that without your help :)

commented

Thank you again for your bug report, I'm working on adding more tests and understanding what's going on. Would it be possible to give me the text that is printed in chat for WOW on a Chinese client when:

  • You loot an object (any object, grey, or better it does not matter) (ie the equivalent of: You receive item: Helmet.)
  • You loot multiple objects (ie the equivalent of: You receive item: Clawx5.)
  • You conjure water or food on a mage (ie the equivalent of: You create conjured mage waterx5)

I suppose it's a problem with a parsing function making an assumption about how the loot message should be like based on English and french (an x + number at the end of the string if it's plural for example). Maybe plural work differently in Chinese? Or by any chance do you have an addon that changes the default loot message installed?

commented

I released a bug fix in 0.6.1c, so hopefully, the addon does not crash anymore, but I'm still not able to parse the real number of items looted for Chinese client. (Assuming its 1 in case of problems). Is the number displayed in Chinese characters?

commented

I have tested Version: 0.6.1c and still have an error message
Chinese client:Mage makes "Conjured Fresh Water" loot message is:
你制造了:[魔法淡水]x14
then get the following error:

23x ...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: table index is nil
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: in function `updatePlayersList'
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:24: in function `handleChatMessageLoot'
GreyHandling\GreyHandling-0.5.2c.lua:18: in function <GreyHandling\GreyHandling.lua:17>

Locals:
player_id = nil
player_name = ""
(*temporary) = <table> {
 PlayerID1AEBCFE1123123 = "TestName-TestServer"
}
(*temporary) = nil
(*temporary) = "table index is nil"
GreyHandling = <table> {
 NAME = "GreyHandling"
 IS_CLASSIC = true
 loot_frame = <unnamed> {
 }
 data = <table> {
 }
 OPTION_COMMAND = "/gho"
 DESCRIPTION = "Helps you get rid of the right grey objects when your bags are full"
 GetLocalization = <function> defined @GreyHandling\constants.lua:51
 SELL_PRICE_TEXT = "卖价:"
 options = <table> {
 }
 frame = <unnamed> {
 }
 DISPLAY_NAME = "Grey Handling"
 functions = <table> {
 }
}

Then I switched the client to English.Mage makes "Conjured Fresh Water" loot message is:
You create:[Conjured Fresh Water]x6
then get the following error:

27x ...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: table index is nil
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: in function `updatePlayersList'
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:24: in function `handleChatMessageLoot'
GreyHandling\GreyHandling-0.5.2c.lua:18: in function <GreyHandling\GreyHandling.lua:17>

Locals:
player_id = nil
player_name = ""
(*temporary) = <table> {
 PlayerID1AEBCFE1123123 = "TestName-TestServer"
}
(*temporary) = nil
(*temporary) = "table index is nil"
GreyHandling = <table> {
 NAME = "GreyHandling"
 IS_CLASSIC = true
 loot_frame = <unnamed> {
 }
 data = <table> {
 }
 OPTION_COMMAND = "/gho"
 DESCRIPTION = "Helps you get rid of the right grey objects when your bags are full"
 GetLocalization = <function> defined @GreyHandling\constants.lua:51
 SELL_PRICE_TEXT = "卖价:"
 options = <table> {
 }
 frame = <unnamed> {
 }
 DISPLAY_NAME = "Grey Handling"
 functions = <table> {
 }
}

Finally, I disabled all Addons except GreyHandling and !BugGrabber(BugSack) on the English client.
Still get the following error:

28x ...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: table index is nil
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: in function `updatePlayersList'
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:24: in function `handleChatMessageLoot'
GreyHandling\GreyHandling-0.5.2c.lua:18: in function <GreyHandling\GreyHandling.lua:17>

Locals:
player_id = nil
player_name = ""
(*temporary) = <table> {
 PlayerID1AEBCFE1123123 = "TestName-TestServer"
}
(*temporary) = nil
(*temporary) = "table index is nil"
GreyHandling = <table> {
 NAME = "GreyHandling"
 IS_CLASSIC = true
 loot_frame = <unnamed> {
 }
 data = <table> {
 }
 OPTION_COMMAND = "/gho"
 DESCRIPTION = "Helps you get rid of the right grey objects when your bags are full"
 GetLocalization = <function> defined @GreyHandling\constants.lua:51
 SELL_PRICE_TEXT = "卖价:"
 options = <table> {
 }
 frame = <unnamed> {
 }
 DISPLAY_NAME = "Grey Handling"
 functions = <table> {
 }
}

It seems that the errors in the above situation are the same?
Mabey you can set the language to Chinese for testing in the game system settings?

commented

Ha, still not working. Well, thanks a lot for the very detailled debug. A problem I can see right now is that the message is 你制造了:[魔法淡水]x14 and that I search for x with a starting space because in English or French you can have a single 'x' in the text ("[Experimental glove] x5") but there is a space just after the object. To be fair I'm going to need to install WOW with the Chinese language as you suggest, I did not know it was possible.

In insight you seem to have GreyHandling-0.5.2c.lua in your debug log, so maybe the fix I did in 0.6.1 would work if you delete the interface/addon/GreyHandling directory, then download the latest version, close WOW then restart.

commented

I confirm that I am using the version: 0.6.1c. Because I deleted the "GreyHandling" folder every time I tested it, and then put the latest version.
After confirmation, 0.5.2c is displayed because it was stored in the WTF directory SavedVariables file "!BugGrabber.lua", this time I deleted it.
Then test again and get the following error:

2x ...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: table index is nil
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:5: in function `updatePlayersList'
...Ons\GreyHandling\functions\handleChatMessageLoot.lua:24: in function `handleChatMessageLoot'
GreyHandling\GreyHandling-0.6.4c.lua:23: in function <GreyHandling\GreyHandling.lua:22>

Locals:
player_id = nil
player_name = ""
(*temporary) = <table> {
}
(*temporary) = nil
(*temporary) = "table index is nil"
GreyHandling = <table> {
 NAME = "GreyHandling"
 IS_CLASSIC = true
 loot_frame = <unnamed> {
 }
 data = <table> {
 }
 OPTION_COMMAND = "/gho"
 DESCRIPTION = "Helps you get rid of the right grey objects when your bags are full"
 GetLocalization = <function> defined @GreyHandling\constants.lua:53
 SELL_PRICE_TEXT = "卖价:"
 options = <table> {
 }
 frame = <unnamed> {
 }
 DISPLAY_NAME = "Grey Handling"
 functions = <table> {
 }
}

Regarding the "X" space problem, since I don't know how to copy the loot information in the game, I input it manually. From the loot information in the game, I can see there is no space before and after the "x".
In addition, I mean not to install the Chinese client, but in the game settings of the Battle.net client, set the World of Warcraft text language to Chinese.
Thank you very much again for your patience!

commented

I have a problem, it seems I can't join a french server if my game is in chinese (I think it's chinese, Chinese is written in Chinese :inception:). Could you traduce me the following, please ?

WoWScrnShot_083119_140607

You gave me a lot of information, thank you. I'm going to make a quick generic fix so the addon does not crash even if I can't test in chinese.

commented

The general meaning in the picture is that you can't log in to the server in Chinese Text Language, because you choose Traditional Chinese, I suggest you try Simplified Chinese.

commented

There is no Lua error now, but when My Mage makes "Conjured Fresh Water", I get the following message:
GreyHanding:we did not manage to undersant"你制造了:[魔法淡水]x14'
GreyHanding:If this seem important to track loot properly,please report it on github.
A similar message appears when I loot any other item, just [魔法淡水]x14 was replacesed by the name and quantity of the item I looted.
What happened?
In addition, I would like to know how to copy the system message of the chat channel?
Also, could this Addons can be localized to Chinese?

commented

Ha, finally the crash disappeared. But yeah, the situation isn't that much better, and you can't copy-paste the error properly now. I could remove this message and the app item tracking entirely while I try to fix this problem. In fact I'm going to do that or I'll get spammed hard with this problem for no reason. Right now I have another problem with simplified Chinese for debugging though. Would be so kind as to translate the following for me, please ?

WoWScrnShot_083119_171535
WoWScrnShot_083119_171543

commented

Regarding this problem, it's really fixed in 0.7.0, the API for WOW classic is a little different than for retail so we did not manage to get the proper name. Also, we do not store information about the item you loot yourself (because you have them in your bag so we don't need to). Really, thank you for helping me with this I was not aware of the differences between retail and classic. The mutually beneficial trade suggestion feature was completely broken for everyone (but there was also more minor problem with the number of item looted in chinese and russian, that you also permitted to fix.).