Bug - Won't Fix r14256 - debug log generated after twitch non-combat

Magus_Prime

Well-known member
While adventuring in the relay browser, in An Illicit Bohemian Party, I got a debug log dump when I hit the non-combat:

Code:
[3233] An Illicit Bohemian Party
Encounter: Around The World
Unexpected error, debug log printed.

Same behavior with the non-combat in the Moonshiner' Woods
[3243] Moonshiners' Woods
Encounter: Crazy Still After All These Years
Unexpected error, debug log printed.

View attachment DEBUG_20140727.txt
 
Last edited:

Darzil

Developer
r14258 doesn't generate an error log. Basically because hooch isn't recognised, You gain 10 hooch became You gain, and there was no check that there was anything after You gain in the parsing before setting a variable equal to it.

It does still generate a "Could not parse" message, but no debug log.
 

lostcalpolydude

Developer
Staff member
More specifically, it doesn't like parsing
Code:
You gain <b>10</b> hooch
I think normally it would see <b>10</b> as non-numeric and stop, but I think AdventureResult is only seeing "You gain", and I can't figure out when the rest of it gets removed.

Adding a check for if ( parsedGain.countTokens() < 4 ) to AdventureResult would get rid of the debug log, but it still results in
Code:
Could not parse: You gain

Edit: And you reached the same conclusion.
 

lostcalpolydude

Developer
Staff member
Actually, I think we reached different conclusions. I'm guessing the cause of the problem is the bold tag, not the fact that it's hooch.
 

lostcalpolydude

Developer
Staff member
I had to use a regex tester to see what was happening, but it's KoLConstants.ANYTAG_BUT_ITALIC_PATTERN splitting up the result (ResultProcessor.processNormalResults) that causes this. I doubt it's worth fixing unless something like this pops up again.
 
Top