Skip to content
Permalink
Browse files

Fix string incorrectly formatted in CS Misc Stats plugin (#704)

Recently, I got those below errors on logs:
```
String formatted incorrectly - parameter 12 (total 12)
L 04/29/2019 - 23:24:40: [AMXX] Displaying debug trace (plugin "miscstats.amxx", version "1.8.3-dev+5154")
L 04/29/2019 - 23:24:40: [AMXX] Run time error 25: parameter error 
L 04/29/2019 - 23:24:40: [AMXX]    [0] miscstats.sma::checkKills (line 922)
```

It just looks like `"RAMPAGE!!! %s^n%L %d %L (%d hs)"` misses last format rule, which should be `"%L"` pointing to `HS` lang key.
  • Loading branch information...
AdamRichard21st authored and Arkshine committed Apr 30, 2019
1 parent 1cc7786 commit 295d09df8bf3007af67e4fb0717c1478c3ce31ee
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugins/cstrike/miscstats.sma
@@ -91,7 +91,7 @@ new g_MultiKillMsg[7][] =
"Multi-Kill! %s^n%L %d %L (%d %L)",
"Ultra-Kill!!! %s^n%L %d %L (%d %L)",
"%s IS ON A KILLING SPREE!!!^n%L %d %L (%d %L)",
"RAMPAGE!!! %s^n%L %d %L (%d hs)",
"RAMPAGE!!! %s^n%L %d %L (%d %L)",
"%s IS UNSTOPPABLE!!!^n%L %d %L (%d %L)",
"%s IS A MONSTER!^n%L %d %L (%d %L)",
"%s IS GODLIKE!!!!^n%L %d %L (%d %L)"

3 comments on commit 295d09d

@AdamRichard21st

This comment has been minimized.

Copy link
Contributor Author

replied May 1, 2019

Hello, @Arkshine
Sadly it didn't fix the issue, String formatted incorrectly logs just randomly came in again.
Even though this PR still fixes the hardcoded "hs" string on "RAMPAGE!!! %s^n%L %d %L (%d hs)", it seems not to fix the error itself.

I'm not able to suggest a fix, I've tried to reproduce the related errors in an isolated plugin with no success.

@regener

This comment has been minimized.

Copy link
Contributor

replied May 30, 2019

@AdamRichard21st
I haven't faced that message since this PR. Are you sure you have recompiled your plugin?

@AdamRichard21st

This comment has been minimized.

Copy link
Contributor Author

replied May 30, 2019

Yes, I'm sure.
Even though the messages didn't appear for a while, it was right there when running the proposed fix.
I didn't touch it since then.

Please sign in to comment.
You can’t perform that action at this time.