Alvin Lin
1 min readApr 15, 2019

--

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 deletekeyword. This isn’t very robust however, and for my more complicated games, I use the hashmap package to handle players and clients.

--

--

Alvin Lin
Alvin Lin

Written by Alvin Lin

I'm a software engineer from New York City with a permanent case of bed hair.

No responses yet