RatingBuster

257 - r386-"malformed pattern" Error

version: r386 updated with curse client
locale: Chinese

This error happens when mouse is pointed at equipment/glyph with modification by percentage like "Cataclysmic Gladiator's Ornamented Gloves(www.wowhead.com/item=73559)" -- Equip: Increases the critical effect chance of your Flash of Light by 2%.

As I tried:
1. Before the line 3134
       return (gsub(text, RusLocalstr, infoString, 1))
RusLocalstr has value "提高2%"(in Chinese), which ends with % and might cause this error.
2. An additional replacing
       RusLocalstr = gsub(RusLocalstr,"%%$","%%%%$")
eliminated this error, however the output became "提高2 (0.01%)". Incorrect, though.
3. In my opinion, the best way is to ignore such a plain effect. I tried adding
      if strmatch(RusLocalstr,"%%$") then return text end
before "return gsub..." and it works fine now.

Thank you for your work.

=======FULL ERROR LOG=========
7x RatingBuster\RatingBuster-r386.lua:3134 malformed pattern (ends with "%")
<in C code>
RatingBuster\RatingBuster-r386.lua:3134 in function <RatingBuster\RatingBuster.lua:2705
(tail call): ?
RatingBuster\RatingBuster-r386.lua:2693 in function "SplitDoJoin"
RatingBuster\RatingBuster-r386.lua:2573 in function "handler"
libs\LibTipHooker-1.1\LibTipHooker-1.1-19.lua:179 in function <libs\LibTipHooker-1.1\LibTipHooker-1.1.lua:174
<in C code>
FrameXML\ContainerFrame.lua:815 in function "ContainerFrameItemButton_OnEnter"
Combuctor-5.0.2\components\item.lua:167 in function <Combuctor\components\item.lua:149

Locals:
self = <table> {
 SetDefaultModuleLibraries = <func> @Ace3\..\AceAddon-3.0.lua:383
 Enable = <func> @Ace3\..\AceAddon-3.0.lua:315
 RegisterChatCommand = <func> @Ace3\..\AceConsole-3.0.lua:85
 EnableModule = <func> @Ace3\..\AceAddon-3.0.lua:348
 modules = <table> {}
 GetModule = <func> @Ace3\..\AceAddon-3.0.lua:231
 IterateEmbeds = <func> @Ace3\..\AceAddon-3.0.lua:458
 defaultModuleLibraries = <table> {}
 GetStatMod = <func> @..\RatingBuster.lua:2159
 UnregisterChatCommand = <func> @Ace3\..\AceConsole-3.0.lua:111
 MODIFIER_STATE_CHANGED = <func> @..\RatingBuster.lua:2266
 optionsFrames = <table> {}
 SplitDoJoin = <func> @..\RatingBuster.lua:2683
 Printf = <func> @Ace3\..\AceConsole-3.0.lua:69
 OnProfileChanged = <func> @..\RatingBuster.lua:2177
 SetDefaultModulePrototype = <func> @Ace3\..\AceAddon-3.0.lua:425
 OnProfileReset = <func> @..\RatingBuster.lua:2184
 OnInitialize = <func> @..\RatingBuster.lua:2204
 baseName = "RatingBuster"
 name = "RatingBuster"
 Bench = <func> @..\RatingBuster.lua:4445
 IsEnabled = <func> @Ace3\..\AceAddon-3.0.lua:467
 orderedModules = <table> {}
 StatSummary = <func> @..\RatingBuster.lua:4065
 DisableModule = <func> @Ace3\..\AceAddon-3.0.lua:366
 ProcessText = <func> @..\RatingBuster.lua:2705
 Disable = <func> @Ace3\..\AceAddon-3.0.lua:330
 ADDON_LOADED = <func> @..\RatingBuster.lua:2281
 OnNewProfile = <func> @..\RatingBuster.lua:2194
 RegisterMessage = <func> @Accountant_Classic\Libs\..\CallbackHandler-1.0.lua:118
 GetArgs = <func> @Ace3\..\AceConsole-3.0.lua:144
 Print = <func> @Ace3\..\AceConsole-3.0.lua:54
 ShowConfig = <func> @..\RatingBuster.lua:2111
 PLAYER_LEVEL_UP = <func> @..\RatingBuster.lua:2254
 OnDisable = <func> @..\RatingBuster.lua:2247
 OnEnable = <func> @..\RatingBuster.lua:2233
 IsModule = <func> @Ace3\..\AceAddon-3.0.lua:484
 db = <table> {}
 SetDefaultModuleState = <func> @Ace3\..\AceAddon-3.0.lua:403
 UNIT_AURA = <func> @..\RatingBuster.lua:2261
 ClearCache = <func> @..\RatingBuster.lua:2162
 SetEnabledState = <func> @Ace3\..\AceAddon-3.0.lua:440
 SetupOptions = <func> @..\RatingBuster.lua:2082
 enabledState = true
 date = "2012-10-01"
 RegisterEvent = <func> @Accountant_Classic\Libs\..\CallbackHandler-1.0.lua:118
 UnregisterAllMessages = <func> @Accountant_Classic\Libs\..\CallbackHandler-1.0.lua:202
 version = "5.0.4 (r385)"
 UnregisterAllEvents = <func> @Accountant_Classic\Libs\..\CallbackHandler-1.0.lua:202
 SendMessage = <func> @Accountant_Classic\Libs\..\CallbackHandler-1.0.lua:87

User When Change
lostcoaster Oct 05, 2012 at 03:47 UTC Changed description:
  This error happens when mouse is pointed at equipment/glyph with modification by percentage like "Cataclysmic Gladiator's Ornamented Gloves(www.wowhead.com/item=73559)" -- Equip: Increases the critical effect chance of your Flash of Light by 2%.

  As I tried:
- 1. Before the line 3134 "return (gsub(text, RusLocalstr, infoString, 1))", RusLocalstr has value "提高2%"(in Chinese), which ends with % and might cause this error.
- 2. An additional replacing "RusLocalstr = gsub(RusLocalstr,"%%$","%%%%$")" eliminated this error, however the output became "提高2 (0.01%)". Incorrect, though.
- 3. In my opinion, the best way is to ignore such a plain effect. I tried adding "if strmatch(RusLocalstr,"%%$") then return text end" before "return gsub..." and it works fine now.
+ 1. Before the line 3134
+        return (gsub(text, RusLocalstr, infoString, 1))
+ RusLocalstr has value "提高2%"(in Chinese), which ends with % and might cause this error.
+ 2. An additional replacing
+        RusLocalstr = gsub(RusLocalstr,"%%$","%%%%$")
+ eliminated this error, however the output became "提高2 (0.01%)". Incorrect, though.
+ 3. In my opinion, the best way is to ignore such a plain effect. I tried adding
+       if strmatch(RusLocalstr,"%%$") then return text end
+ before "return gsub..." and it works fine now.
  Thank you for your work.
lostcoaster Oct 05, 2012 at 03:45 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 2 comments
  • 2 comments

Facts

Last updated
Oct 05, 2012
Reported
Oct 05, 2012
Status
New - Issue has not had initial review yet.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees