gemidyne/microtf2

Weapon Distribution Failure

CaptainBoggle opened this issue ยท 3 comments

Describe the bug
Plugin seems to be unable to give weapons to any player except one.

Expected behavior
All players should be given appropriate weapons for the round.

Do you know what version of the gamemode this bug occurred on?
5.2.0 on latest map.

Additional info
Error in console:

L 10/08/2021 - 10:06:42: [SM] Exception reported: Native is not bound  
L 10/08/2021 - 10:06:42: [SM] Blaming: AS-MicroTF2.smx  
L 10/08/2021 - 10:06:42: [SM] Call stack trace:  
L 10/08/2021 - 10:06:42: [SM]   [0] TF2Attrib_SetByDefIndex  
L 10/08/2021 - 10:06:42: [SM]   [1] Line 64, D:\src\gemidyne\microtf2\src\scripting  \Weapons.sp::Weapons_EquipWeaponByItemIndex  
L 10/08/2021 - 10:06:42: [SM]   [2] Line 697, D:\src\gemidyne\microtf2\src\scripting\MethodMaps/Player.inc::Player.GiveWeapon  
L 10/08/2021 - 10:06:42: [SM]   [3] Line 35, D:\src\gemidyne\microtf2\src\scripting  \Minigames/Minigame21.sp::Minigame21_OnMinigameSelected  
L 10/08/2021 - 10:06:42: [SM]   [5] Call_Finish  
L 10/08/2021 - 10:06:42: [SM]   [6] Line 514, D:\src\gemidyne\microtf2\src\scripting\AS-MicroTF2.sp::Timer_GameLogic_StartMinigame  
L 10/08/2021 - 10:06:42: [SM] Exception reported: Client index 0 is invalid  
L 10/08/2021 - 10:06:42: [SM] Blaming: AS-MicroTF2.smx  
L 10/08/2021 - 10:06:42: [SM] Call stack trace:  
L 10/08/2021 - 10:06:42: [SM]   [0] ClientCommand  
L 10/08/2021 - 10:06:42: [SM]   [1] Line 228, D:\src\gemidyne\microtf2\src\scripting\MethodMaps/Player.inc::Player.DisplayOverlay  
L 10/08/2021 - 10:06:42: [SM]   [2] Line 520, D:\src\gemidyne\microtf2\src\scripting\AS-MicroTF2.sp::Timer_GameLogic_StartMinigame  

Hi,

Thanks for the report - I think you may be getting this error due to the TF2Attributes plugin not being loaded. This is a required dependency for the gamemode to load - could you check that you have it installed and running?

The latest release should be available here: https://github.com/FlaminSarge/tf2attributes/releases/latest

Other dependencies for the gamemode are noted in our install guide - https://github.com/gemidyne/microtf2/wiki/How-to-install-the-gamemode

Let me know how it goes - cheers :)

TL;DR: The following outlines my debugging process as I was typing this out while debugging, but the final issue was that I forgot to add tf2.attributes.txt to the gamedata folder, so you don't need to read any of it really.

Hmm, that isn't it unfortunately, I already have that plugin and all the others installed.

I have gone ahead and reformatted the console log, as it was previously all one ugly block, sorry about that.

I have also attached some lines of interest from logs of the startup of the server which I seem to have missed previously.

Unable to load plugin "addons/metamod/bin/win64/server"  

L 10/10/2021 - 11:59:35: [TF2ITEMS] "GiveNamedItem" offset = 478
L 10/10/2021 - 11:59:35: [AS-MicroTF2.smx] Minigame6: Loaded 24 answers
L 10/10/2021 - 11:59:35: [AS-MicroTF2.smx] Minigame System initialized with 29 Minigame(s) and 8 Bossgame(s).
L 10/10/2021 - 11:59:35: [SM] Error parsing gameconfig file "c:\users\capta\desktop\tf2-server-manager-master\servermanager\bin\release\servers\mtf2_server\server\tf\addons\sourcemod\gamedata\tf2.attributes.txt":
L 10/10/2021 - 11:59:35: [SM] Error 1 on line 0, col 0: Stream failed to open
L 10/10/2021 - 11:59:35: [SM] Exception reported: Unable to open tf2.attributes: File could not be opened: The system cannot find the file specified.

L 10/10/2021 - 11:59:35: [SM] Blaming: tf2attributes.smx
L 10/10/2021 - 11:59:35: [SM] Call stack trace:
L 10/10/2021 - 11:59:35: [SM]   [0] LoadGameConfigFile
L 10/10/2021 - 11:59:35: [SM]   [1] Line 85, C:\sourcemod\tf2attributes\tf2attributes.sp::OnPluginStart
L 10/10/2021 - 11:59:35: [SM] Unable to load plugin "tf2attributes.smx": Error detected in plugin startup (see error logs)

So from this it seems pretty clear that you are right, and the tf2attributes plugin isn't loading. I took a look at the error logs and found the following:

L 10/10/2021 - 11:58:04: SourceMod error session started
L 10/10/2021 - 11:58:04: Info (map "warioware_redux_v5b") (file "c:\users\capta\desktop\tf2-server-manager-master\servermanager\bin\release\servers\mtf2_server\server\tf\addons\sourcemod\logs\errors_20211010.log")
L 10/10/2021 - 11:58:04: [SM] Error parsing gameconfig file "c:\users\capta\desktop\tf2-server-manager-master\servermanager\bin\release\servers\mtf2_server\server\tf\addons\sourcemod\gamedata\tf2.attributes.txt":
L 10/10/2021 - 11:58:04: [SM] Error 1 on line 0, col 0: Stream failed to open
L 10/10/2021 - 11:58:04: [SM] Exception reported: Unable to open tf2.attributes: File could not be opened: The system cannot find the file specified.


L 10/10/2021 - 11:58:04: [SM] Blaming: tf2attributes.smx
L 10/10/2021 - 11:58:04: [SM] Call stack trace:
L 10/10/2021 - 11:58:04: [SM]   [0] LoadGameConfigFile
L 10/10/2021 - 11:58:04: [SM]   [1] Line 85, C:\sourcemod\tf2attributes\tf2attributes.sp::OnPluginStart
L 10/10/2021 - 11:58:04: [SM] Unable to load plugin "tf2attributes.smx": Error detected in plugin startup (see error logs)
L 10/10/2021 - 11:58:43: SourceMod error session started
L 10/10/2021 - 11:58:43: Info (map "warioware_redux_v5b") (file "c:\users\capta\desktop\tf2-server-manager-master\servermanager\bin\release\servers\mtf2_server\server\tf\addons\sourcemod\logs\errors_20211010.log")
L 10/10/2021 - 11:58:43: [SM] Error parsing gameconfig file "c:\users\capta\desktop\tf2-server-manager-master\servermanager\bin\release\servers\mtf2_server\server\tf\addons\sourcemod\gamedata\tf2.attributes.txt":
L 10/10/2021 - 11:58:43: [SM] Error 1 on line 0, col 0: Stream failed to open
L 10/10/2021 - 11:58:43: [SM] Exception reported: Unable to open tf2.attributes: File could not be opened: The system cannot find the file specified.


L 10/10/2021 - 11:58:43: [SM] Blaming: tf2attributes.smx
L 10/10/2021 - 11:58:43: [SM] Call stack trace:
L 10/10/2021 - 11:58:43: [SM]   [0] LoadGameConfigFile
L 10/10/2021 - 11:58:43: [SM]   [1] Line 85, C:\sourcemod\tf2attributes\tf2attributes.sp::OnPluginStart
L 10/10/2021 - 11:58:43: [SM] Unable to load plugin "tf2attributes.smx": Error detected in plugin startup (see error logs)
L 10/10/2021 - 11:59:35: SourceMod error session started
L 10/10/2021 - 11:59:35: Info (map "warioware_redux_v5b") (file "c:\users\capta\desktop\tf2-server-manager-master\servermanager\bin\release\servers\mtf2_server\server\tf\addons\sourcemod\logs\errors_20211010.log")
L 10/10/2021 - 11:59:35: [SM] Error parsing gameconfig file "c:\users\capta\desktop\tf2-server-manager-master\servermanager\bin\release\servers\mtf2_server\server\tf\addons\sourcemod\gamedata\tf2.attributes.txt":
L 10/10/2021 - 11:59:35: [SM] Error 1 on line 0, col 0: Stream failed to open
L 10/10/2021 - 11:59:35: [SM] Exception reported: Unable to open tf2.attributes: File could not be opened: The system cannot find the file specified.


L 10/10/2021 - 11:59:35: [SM] Blaming: tf2attributes.smx
L 10/10/2021 - 11:59:35: [SM] Call stack trace:
L 10/10/2021 - 11:59:35: [SM]   [0] LoadGameConfigFile
L 10/10/2021 - 11:59:35: [SM]   [1] Line 85, C:\sourcemod\tf2attributes\tf2attributes.sp::OnPluginStart
L 10/10/2021 - 11:59:35: [SM] Unable to load plugin "tf2attributes.smx": Error detected in plugin startup (see error logs)

So clearly this is entirely my fault, and I somehow forgot to add the tf2.attributes.txt to the gamedata folder... Oops.
I haven't had a chance to properly playtest this yet, but judging by the lack of errors now, I think I can safely assume this is solved! Thank you for the help :)

No problem but you did highlight that there is a missing check within the plugin - it should check on startup that TF2Attributes is running fine. I'll add that extra check in ๐Ÿ‘