ws-cs2 / cs2-surftimer

48 stars 6 forks source link

Linux not safing timers #3

Closed jovicdev97 closed 1 year ago

jovicdev97 commented 1 year ago

OS: Ubuntu 22.04

Reproduce:

Player sets record on surf map. After server restart, player joins again. Surf Timer did not save and this exceptions in console:

L 11/08/2023 - 00:52:20: server_cvar: "sv_cheats" "true"
Script failed to LoadKeyValues scripts/wst_records/surf_utopia_njv.txt
Leaderboard not found, creating new one
-----------------
wst-leaderboard.lua loaded
--------------------
Will's Surf Timer _1.0.0
--------------------
Map: surf_utopia_njv
Zones loaded from disk
Zones Version: _1.0
...
SV: "jupiter<0><[U:1:201730105]><>" STEAM USERID validated
L 11/08/2023 - 00:52:28: "jupiter<0><[U:1:201730105]><>" STEAM USERID validated
Accepting Steam Net connection #487992952 UDP steamid:76561198011875608@89.247.171.39:19005
Sending S2C_CHALLENGE [0 auth 3] to 89.247.171.39:19005
Receiving C2S_CONNECT [protocol 13967 0 auth 3] from 89.247.171.39:19005
CNetworkGameServerBase::ConnectClient( name='#randomplayer', remote='89.247.171.39:19005' )
Creating NetChan for user 1 '#randomplayer' @ 89.247.171.39:19005
Associating NetChan #FreePalasti 89.247.171.39:19005[1] (89.247.171.39:19005) with Steam Net Connection handle #487992952 (userdata 1)
CServerSideClientBase::Connect( name='#randomplayer', userid=1, fake=0, chan->addr=89.247.171.39:19005 )
01:52:37
/AMP/counter-strike2/730/game/csgo/scripts/vscripts/wst.lua:372: in function </AMP/counter-strike2/730/game/csgo/scripts/vscripts/wst.lua:368>
L 11/08/2023 - 00:52:31: "jupiter<0><[U:1:201730105]><>" entered the game
SV: "#randomplayer<1><[U:1:51609880]><>" STEAM USERID validated
L 11/08/2023 - 00:52:31: "#randomplayer<1><[U:1:51609880]><>" STEAM USERID validated
SV: Sending full update to client jupiter (reason: initial update)
jupiter 92.118.63.164:65045[1]: NetChan Setting Timeout to 20.00 seconds
Client 1 '#randomplayer' signon state SIGNONSTATE_SPAWN -> SIGNONSTATE_FULL
Script Runtime Error: /AMP/counter-strike2/730/game/csgo/scripts/vscripts/wst.lua:372: attempt to index local 'player_connect' (a nil value)
stack traceback:
/AMP/counter-strike2/730/game/csgo/scripts/vscripts/wst.lua:372: in function </AMP/counter-strike2/730/game/csgo/scripts/vscripts/wst.lua:368>
L 11/08/2023 - 00:52:32: "#randomplayer<1><[U:1:51609880]><>" entered the game
SV: Sending full update to client #randomplayer (reason: initial update)
#FreePalasti 89.247.171.39:19005[1]: NetChan Setting Timeout to 20.00 seconds
"jupiter<0><[U:1:201730105]><Unassigned>" ChangeTeam() CTMDBG , team 0, req team 3 willSwitch 0, 13.86
L 11/08/2023 - 00:52:35: "jupiter<0><[U:1:201730105]>" switched from team <Unassigned> to <CT>
...
Client 1 '#randomplayer' signon state SIGNONSTATE_NONE -> SIGNONSTATE_CONNECTED
L 11/08/2023 - 00:49:47: "#randomplayer<1><[U:1:51609880]><>" connected, address "89.247.171.39:18988"
player_connect1
Sending S2C_CONNECTION to 89.247.171.39:18988 [addons:'3070544749']
Client #1 "#randomplayer" connected @ 89.247.171.39:18988
ClientPutInServer create new player controller [#randomplayer]
Client 1 '#randomplayer' setting rate to 786432
Client 1 '#randomplayer' signon state SIGNONSTATE_CONNECTED -> SIGNONSTATE_NEW
Client 1 '#randomplayer' signon state SIGNONSTATE_NEW -> SIGNONSTATE_PRESPAWN
Client 1 '#randomplayer' signon state SIGNONSTATE_PRESPAWN -> SIGNONSTATE_SPAWN
SV: "jupiter<0><[U:1:201730105]><>" STEAM USERID validated
L 11/08/2023 - 00:49:47: "jupiter<0><[U:1:201730105]><>" STEAM USERID validated
SV: "#randomplayer<1><[U:1:51609880]><>" STEAM USERID validated
L 11/08/2023 - 00:49:48: "#randomplayer<1><[U:1:51609880]><>" STEAM USERID validated
Client 1 '#randomplayer' signon state SIGNONSTATE_SPAWN -> SIGNONSTATE_FULL
Script Runtime Error: /AMP/counter-strike2/730/game/csgo/scripts/vscripts/wst.lua:372: attempt to index local 'player_connect' (a nil value)
stack traceback:
/AMP/counter-strike2/730/game/csgo/scripts/vscripts/wst.lua:372: in function </AMP/counter-strike2/730/game/csgo/scripts/vscripts/wst.lua:368>
L 11/08/2023 - 00:49:49: "#randomplayer<1><[U:1:51609880]><>" entered the game
SV: Sending full update to client #randomplayer (reason: initial update)
#FreePalasti 89.247.171.39:18988[1]: NetChan Setting Timeout to 20.00 seconds
Client 0 'jupiter' signon state SIGNONSTATE_SPAWN -> SIGNONSTATE_FULL
Script Runtime Error: /AMP/counter-strike2/730/game/csgo/scripts/vscripts/wst.lua:372: attempt to index local 'player_connect' (a nil value)
stack traceback:
/AMP/counter-strike2/730/game/csgo/scripts/vscripts/wst.lua:372: in function </AMP/counter-strike2/730/game/csgo/scripts/vscripts/wst.lua:368>
L 11/08/2023 - 00:49:50: "jupiter<0><[U:1:201730105]><>" entered the game
SV: Sending full update to client jupiter (reason: initial update)
jupiter 92.118.63.164:57558[1]: NetChan Setting Timeout to 20.00 seconds
SV: 'jupiter' (tick 1276) OnSimulateUserCommands(), commands starved for 64 ticks, 1000.0 ms (limit 1000.0 ms) not queuing additional command
01:49:57
L 11/08/2023 - 00:49:57: server_cvar: "sv_cheats" "true"
01:50:57
"jupiter<0><[U:1:201730105]><Unassigned>" OnPreResetRound => CTMDBG, team 0 will switch 0 20.11
"#randomplayer<1><[U:1:51609880]><TERRORIST>" OnPreResetRound => CTMDBG, team 2 will switch 0 20.11
L 11/08/2023 - 00:49:53: Starting Freeze period
L 11/08/2023 - 00:49:53: World triggered "Match_Start" on "surf_utopia_njv"
L 11/08/2023 - 00:49:53: MatchStatus: Team "CT" is unset.
ws-cs2 commented 1 year ago

Have discussed this with Para on discord and we made the metamod plugin to solve this 👍