hey guys...those who got some experience with LOTF 5165 I would appreciate if you would help me
Description: everytime I open the server/somebody with friends logs on I get these errors...
Character.cs:
public struct Friend
{
public uint UID;
string name;
public void WriteThis(System.IO.BinaryWriter I)
{
I.Write(UID);
I.Write(name);
}
public void ReadThis(System.IO.BinaryReader I)
{
UID = I.ReadUInt32();
name = I.ReadString(); //here goes it...
}
public bool Online
{
get
{
return World.H_Chars.Contains(UID);
}
}
public Character Info
{
get
{
if (Online)
return (Character)World.H_Chars[UID];
return null;
}
}
public string Name
{
get { return name; }
set { name = value; }
}
}
Database.cs
C.Friends = new Hashtable();
byte FriendCount = BR.ReadByte();
for (byte i = 0; i < FriendCount; i++)
{
Game.Friend F = new NewestCOServer.Game.Friend();
F.ReadThis(BR); //here goes the second problem
if (!C.Friends.Contains(F.UID))
C.Friends.Add(F.UID, F);
}
Also this problem wasn't forever...it appeared some days ago...idk why...my opinion it could be because of the total number of friends on server is too big idk..
if there's a fix to this please tell me
thanks