Raised This Month: $51 Target: $400
 12% 

[ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 09-15-2019 , 09:10   Re: [ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
Reply With Quote #11

Hi,
Great plugin, thx. I found out 2 errors:

1: Can't compile cuz it says

Code:
//SourceMod Batch Compiler
// by the SourceMod Dev Team


//// afk_manager4.sp
//
// C:\Users\Bast\Downloads\last dls\csgosl-windows\csgosl\server\csgo\addons\sourcemod\scripting\afk_manager4.sp(904) : error 180: function return type differs from prototype. expected 'void', but got 'int'
//
// 1 Error.
//
// Compilation Time: 0,98 sec
// ----------------------------------------

Press enter to exit ...
So ofc I changed the public int Updater_OnPluginUpdated() to public void Updater_OnPluginUpdated() and it worked.

*** EDIT: I had an old version of updater.inc. ***

2: Then, before I made the changes above, I had this error when a AFK player who did not choose a team, was forced to join a team by the game, and THEN moved to spec (meaning the player actually did not do anything after connecting).

Code:
L 09/15/2019 - 14:07:02: SourceMod error session started
L 09/15/2019 - 14:07:02: Info (map "surf_ace") (file "errors_20190915.log")
L 09/15/2019 - 14:07:02: [SM] Exception reported: Script execution timed out
L 09/15/2019 - 14:07:02: [SM] Blaming: afk_manager4.smx
L 09/15/2019 - 14:07:02: [SM] Call stack trace:
L 09/15/2019 - 14:07:02: [SM]   [0] ForcePlayerSuicide
L 09/15/2019 - 14:07:02: [SM]   [1] Line 2365, /home/forums/content/files/3/2/0/9/1/170330.attach::MoveAFKClient
L 09/15/2019 - 14:07:02: [SM]   [2] Line 2204, /home/forums/content/files/3/2/0/9/1/170330.attach::Timer_CheckPlayer
L 09/15/2019 - 14:25:32: Error log file session closed.
By luck I could check the console when it happened, and I noticed that the client had the "No user logon" error:
Code:
PutClientInServer: no info_player_start on level
L 09/15/2019 - 14:02:53: "S¤ü╬▒ĐĹĐé╬╣╬▒Đé╬Á<148><STEAM_1:0:123456789><>" entered the game
L 09/15/2019 - 14:03:25: "S¤ü╬▒ĐĹĐé╬╣╬▒Đé╬Á<148><STEAM_1:0:123456789>" switched from team <Unassigned> to <TERRORIST>
L 09/15/2019 - 14:04:55: [afk_manager4.smx] S¤ü╬▒ĐĹĐé╬╣╬▒Đé╬Á<148><STEAM_1:0:161302819><> was moved to spectate for being AFK too long.
L 09/15/2019 - 14:07:02: [SM] Exception reported: Script execution timed out
L 09/15/2019 - 14:07:02: [SM] Blaming: afk_manager4.smx
L 09/15/2019 - 14:07:02: [SM] Call stack trace:
L 09/15/2019 - 14:07:02: [SM]   [0] ForcePlayerSuicide
L 09/15/2019 - 14:07:02: [SM]   [1] Line 2365, /home/forums/content/files/3/2/0/9/1/170330.attach::MoveAFKClient
L 09/15/2019 - 14:07:02: [SM]   [2] Line 2204, /home/forums/content/files/3/2/0/9/1/170330.attach::Timer_CheckPlayer
L 09/15/2019 - 14:07:02: "S¤ü╬▒ĐĹĐé╬╣╬▒Đé╬Á<148><STEAM_1:0:123456789><TERRORIST>" [-4400 -512 3972] committed suicide with "world"
L 09/15/2019 - 14:07:02: "S¤ü╬▒ĐĹĐé╬╣╬▒Đé╬Á<148><STEAM_1:0:123456789>" switched from team <TERRORIST> to <Spectator>
STEAMAUTH: Client S¤ü╬▒ĐĹĐé╬╣╬▒Đé╬Á received failure code 6
L 09/15/2019 - 14:07:02: STEAMAUTH: Client S¤ü╬▒ĐĹĐé╬╣╬▒Đé╬Á received failure code 6
L 09/15/2019 - 14:07:02: "S¤ü╬▒ĐĹĐé╬╣╬▒Đé╬Á<148><STEAM_1:0:123456789><Spectator>" disconnected (reason "No user logon")
L 09/15/2019 - 14:07:03: "S¤ü╬▒ĐĹĐé╬╣╬▒Đé╬Á<148><STEAM_1:0:123456789>" switched from team <Spectator> to <Unassigned>
Dropped S¤ü╬▒ĐĹĐé╬╣╬▒Đé╬Á from server: No user logon
I supposed it was a problem with the ForcePlayerSuicide function like the error log says, but indeed, after looking at the code, everything was normal there.
So I looked at the rest and noticed that all the hooks were default or post hooks, which means they should NOT return a value, see here: https://wiki.alliedmods.net/Events_(SourceMod_Scripting)

So I changed the 'public Action' on Post Hooks to 'public void', removed the return values in them, and after my first test, I don't have the error anymore.
But anyway this error might have been due to the No user logon situation.

Cheers,
St00ne
__________________

*** *** ***
-My plugins-

Last edited by St00ne; 09-19-2019 at 09:44.
St00ne is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode