I've come over this bug recently and have no idea how to provide an efficient fix for it. Too tired&busy to experiment over it therefore I'm looking for a solution to this issue. I'll attempt to explain this as simply as possible.
As you all know, when you join a server. There's a state inbetween you joining and hitting the "join" hook. This state occurs during the "Connecting to server" phase which can be often prolonged due to lag.
During that state you're given an ID in the server however you don't reach the join hook yet.
Clear so far? Alright. The problem with this is that if you're using a script to loop through the players at some time and they have a user object defined, it returns a nil value and crashes the script.
If that doesn't explain it then consider this le badly made flowchart.
This phase occurs for 2-4 seconds (depending on lag), however that's sufficient enough to bug the script by returning a nil during loops if you need to update something in their array. Is there any way to check if a player has completely joined?
1× editiert, zuletzt 14.11.15 12:54:32