[Bug] playerDropped gives Invalid arguments specified #280
Closed
MrGonzy
started this conversation in
[BUG] FiveM for GTAV Enhanced
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
When i disconnect/quit from my server, it gives
Invalid arguments specified to event handler for 'playerDropped': Handler: MyResource.Server.ServerMain.OnPlayerDropped, Source: 'internal-net:1', Args: ["","__cfx_internal:client",2] Error: Source player is required for this handler, since parameter 'sourcePlayer' (index 0) is not nullable
Another workaround
Do the separator similar as playerconnecting to get the handle of the player joined.
To have a list of Player as static
public static List JoinedPlayers = new List();
add them when player has joined. Then on player dropped, removed them from list.
Not an ideal way but works to retain player object before removing them from pool
Issue type
Server
Repro rate
Always
Server build version
build 96
OS
No response
CPU
No response
GPU
No response
RAM
No response
Storage type
None
Connection type
None
ISP and bandwidth
No response
DxDiag
No response
Network graph
No response
Platform
None
OS version / distribution
No response
CPU
No response
RAM
No response
Using txAdmin?
None
Hosting provider
None
Machine type
None
/perf endpoint output
No response
DDoS protection
No response
ulimit -n value (Linux only)
No response
Docker Compose file (Docker only)
No response
Steps to Reproduce
Expected Behavior
Player disconnected should have an object to them before fully being disconnected.
Actual Behavior
Invalid arguments specified to event handler for 'playerDropped': Handler: MyScript.Server.ServerMain.OnPlayerDropped, Source: 'internal-net:1', Args: ["","__cfx_internal:client",2] Error: Source player is required for this handler, since parameter 'sourcePlayer' (index 0) is not nullable
Evidence
No response
Additional Context
No response
All reactions