Target5150 / MoYu_Server_Stupid_Plugins

L4D2 Target Cat Project
GNU General Public License v3.0
80 stars 21 forks source link

Survivor FF Announce #10

Closed SupremeJacket closed 2 years ago

SupremeJacket commented 2 years ago

Hello, I just want to report error about your Survivor FF Announce plugin:

L 12/10/2021 - 15:59:35: [SM] Exception reported: Client index 2 is invalid (arg 5) L 12/10/2021 - 15:59:35: [SM] Blaming: l4d_ffannounce.smx L 12/10/2021 - 15:59:35: [SM] Call stack trace: L 12/10/2021 - 15:59:35: [SM] [0] FormatEx L 12/10/2021 - 15:59:35: [SM] [1] Line 130, D:\GAMES\SERVER\L4D2\left4dead2\addons\sourcemod\scripting\l4d_ffannounce.sp::AnnounceFF L 12/10/2021 - 16:00:00: Error log file session closed.

jensewe commented 2 years ago

Thanks for the report, though it seems this issue has not occurred on my end recently, with several games taking place. Moreover, judging from code I don't think this error will actually happen: https://github.com/Target5150/MoYu_Server_Stupid_Plugins/blob/498368ac55c2f7ffd7f8147122a7462768114fc2/The%20Last%20Stand/l4d_ffannounce/l4d_ffannounce.sp#L120 https://github.com/Target5150/MoYu_Server_Stupid_Plugins/blob/498368ac55c2f7ffd7f8147122a7462768114fc2/The%20Last%20Stand/l4d_ffannounce/l4d_ffannounce.sp#L125 These 2 checks should do the trick that guarantees valid client indices are passed to functions. I could be wrong but I would probably not proceed a fix until the plugin on your side is identical to this repo's :)

jensewe commented 2 years ago

I've committed an update trying to fix this after some revisions, well I still don't get it why though. I should be pretty sure that the clients is always valid across the functions. However, perhaps there just can be some random extreme edges like threaded issue, and if so it might not be even worth a fix here.