AssLikeThat
Posting Freak
- Jan 27, 2013
- 765
- 154
I want to add public rooms to the public room section I've had it working before but i don't know what i've done :S
When i add public rooms to navigator_publics_new table i get this error when i open it up, I've changed the SerializePublicRooms() method in Navigator.cs but the error is pointing to line 84 in PublicItem.cs
Line 84:
Full Method in PublicItem.cs:
Quick Image:
Any help is much appreciated, Thanks.
When i add public rooms to navigator_publics_new table i get this error when i open it up, I've changed the SerializePublicRooms() method in Navigator.cs but the error is pointing to line 84 in PublicItem.cs
Line 84:
Code:
this.RoomInfo.Serialize(Message, false);
Full Method in PublicItem.cs:
Code:
internal void Serialize(ServerMessage Message)
{
try
{
Message.AppendInt32(this.Id);
Message.AppendString((this.itemType != PublicItemType.PUBLIC_FLAT) ? this.Caption : string.Empty);
Message.AppendString(this.Description);
Message.AppendInt32(this.Type);
Message.AppendString((this.itemType == PublicItemType.PUBLIC_FLAT) ? this.Caption : string.Empty);
Message.AppendString(this.Image);
Message.AppendInt32((this.ParentId > 0) ? this.ParentId : 0);
Message.AppendInt32((this.RoomInfo != null) ? this.RoomInfo.UsersNow : 0);
Message.AppendInt32((this.itemType == PublicItemType.NONE) ? 0 : ((this.itemType == PublicItemType.TAG) ? 1 : ((this.itemType == PublicItemType.FLAT) ? 2 : ((this.itemType == PublicItemType.PUBLIC_FLAT) ? 2 : ((this.itemType == PublicItemType.CATEGORY) ? 4 : 0)))));
if (this.itemType == PublicItemType.TAG)
{
Message.AppendString(this.TagsToSearch);
}
else if (this.itemType == PublicItemType.CATEGORY)
{
Message.AppendBoolean(false);
}
else if (this.itemType == PublicItemType.FLAT)
{
this.RoomInfo.Serialize(Message, false);
}
else if (this.itemType == PublicItemType.PUBLIC_FLAT)
{
this.RoomInfo.Serialize(Message, false);
}
}
catch (Exception exception)
{
Console.WriteLine("Exception on publicitems composing: " + exception.ToString());
}
}
Quick Image:
Any help is much appreciated, Thanks.