M
midnightswan
Hi,
I've got a hashtable that contains of list of remote network Player
objects. The unique key used is the Player's IP address as a string.
The problem I'm getting is when a Player disconnects I do a
_RemotePlayer.remove[ipKey];
However, if the Player joins the game again and I add a new Player
object with the same IP address being the key to the hashtable I get an
ArguementException.
It seems to me that when I remove the Player from the hashtable the key
is not removed as well. How do I remove the key from the table? Am I
able to do that? or do hashtables always keep a used key and I have to
do a .ContainsKey check on it before adding players to the table?
Thanks in Advance,
MS
I've got a hashtable that contains of list of remote network Player
objects. The unique key used is the Player's IP address as a string.
The problem I'm getting is when a Player disconnects I do a
_RemotePlayer.remove[ipKey];
However, if the Player joins the game again and I add a new Player
object with the same IP address being the key to the hashtable I get an
ArguementException.
It seems to me that when I remove the Player from the hashtable the key
is not removed as well. How do I remove the key from the table? Am I
able to do that? or do hashtables always keep a used key and I have to
do a .ContainsKey check on it before adding players to the table?
Thanks in Advance,
MS