I’m assuming the players variable is referring to an array since you’re calling the splice method on it, in which case those arguments won’t work since splice takes indices for arguments.
If the players variable is a dictionary according to the post, then you can’t call the splice method and you should use the delete
keyword. This isn’t very robust however, and for my more complicated games, I use the hashmap package to handle players and clients.