Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
SerializeExtraData Item crash...
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Reikenz" data-source="post: 441001" data-attributes="member: 80340"><p>Hello..</p><p></p><p>I have this bug in my scoreboard wired</p><p></p><p>I have change ItemBehaviourUtility to SerializeExtraData which is directly integrated into the furni interaction</p><p>my problem is for the scoreboard wired i have a crash:</p><p></p><p>[CODE=csharp]public void SerializeExtradata(Item Item, ServerPacket Message)</p><p> {</p><p> Message.WriteInteger(Item.LimitedNo > 0 ? 256 : 0);</p><p> Message.WriteString(Item.ExtraData);</p><p></p><p> string username;</p><p> string name = Item.GetBaseItem().ItemName;</p><p> string type = name.Split('*')[1];</p><p></p><p> if (type != null)</p><p> {</p><p> Dictionary<int, KeyValuePair<int, string>> ScoreBordata = new Dictionary<int, KeyValuePair<int, string>>();</p><p> Message.WriteInteger(0);</p><p> Message.WriteInteger(6);</p><p> Message.WriteString("1");</p><p> Message.WriteInteger(1);</p><p></p><p> if (Item.GetRoom() != null)</p><p> {</p><p> switch (type)</p><p> {</p><p> case "2":</p><p> Message.WriteInteger(1);</p><p> Message.WriteInteger(Item.GetRoom().WiredScoreBordDay.Count);</p><p> ScoreBordata = Item.GetRoom().WiredScoreBordDay;</p><p> break;</p><p></p><p> case "3":</p><p> Message.WriteInteger(2);</p><p> Message.WriteInteger(Item.GetRoom().WiredScoreBordWeek.Count);</p><p> ScoreBordata = Item.GetRoom().WiredScoreBordWeek;</p><p> break;</p><p></p><p></p><p> case "4":</p><p> Message.WriteInteger(3);</p><p> Message.WriteInteger(Item.GetRoom().WiredScoreBordMonth.Count);</p><p> ScoreBordata = Item.GetRoom().WiredScoreBordMonth;</p><p> break;</p><p></p><p> default:</p><p> Message.WriteInteger(1);</p><p> Message.WriteInteger(0);</p><p> ScoreBordata = null;</p><p> break;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> Message.WriteInteger(1);</p><p> Message.WriteInteger(1);</p><p> Message.WriteInteger(0);</p><p> Message.WriteInteger(1);</p><p> Message.WriteString("Ce tableau de score ne fonctionne pas encore :(");</p><p> }</p><p></p><p> if (ScoreBordata.Count != 0)</p><p> {</p><p> foreach (KeyValuePair<int, string> value in (</p><p> from i in ScoreBordata</p><p> orderby i.Value.Key descending</p><p> select i).ToDictionary<KeyValuePair<int, KeyValuePair<int, string>>, int, KeyValuePair<int, string>>((KeyValuePair<int, KeyValuePair<int, string>> i) => i.Key, (KeyValuePair<int, KeyValuePair<int, string>> i) => i.Value).Values)</p><p> {</p><p> username = value.Value;</p><p> Message.WriteInteger(value.Key);</p><p> Message.WriteInteger(1);</p><p> Message.WriteString((string.IsNullOrEmpty(username) ? string.Empty : username));</p><p> }</p><p> }</p><p> }</p><p> }[/CODE]</p><p></p><p>Can someone help me for this bug please?</p></blockquote><p></p>
[QUOTE="Reikenz, post: 441001, member: 80340"] Hello.. I have this bug in my scoreboard wired I have change ItemBehaviourUtility to SerializeExtraData which is directly integrated into the furni interaction my problem is for the scoreboard wired i have a crash: [CODE=csharp]public void SerializeExtradata(Item Item, ServerPacket Message) { Message.WriteInteger(Item.LimitedNo > 0 ? 256 : 0); Message.WriteString(Item.ExtraData); string username; string name = Item.GetBaseItem().ItemName; string type = name.Split('*')[1]; if (type != null) { Dictionary<int, KeyValuePair<int, string>> ScoreBordata = new Dictionary<int, KeyValuePair<int, string>>(); Message.WriteInteger(0); Message.WriteInteger(6); Message.WriteString("1"); Message.WriteInteger(1); if (Item.GetRoom() != null) { switch (type) { case "2": Message.WriteInteger(1); Message.WriteInteger(Item.GetRoom().WiredScoreBordDay.Count); ScoreBordata = Item.GetRoom().WiredScoreBordDay; break; case "3": Message.WriteInteger(2); Message.WriteInteger(Item.GetRoom().WiredScoreBordWeek.Count); ScoreBordata = Item.GetRoom().WiredScoreBordWeek; break; case "4": Message.WriteInteger(3); Message.WriteInteger(Item.GetRoom().WiredScoreBordMonth.Count); ScoreBordata = Item.GetRoom().WiredScoreBordMonth; break; default: Message.WriteInteger(1); Message.WriteInteger(0); ScoreBordata = null; break; } } else { Message.WriteInteger(1); Message.WriteInteger(1); Message.WriteInteger(0); Message.WriteInteger(1); Message.WriteString("Ce tableau de score ne fonctionne pas encore :("); } if (ScoreBordata.Count != 0) { foreach (KeyValuePair<int, string> value in ( from i in ScoreBordata orderby i.Value.Key descending select i).ToDictionary<KeyValuePair<int, KeyValuePair<int, string>>, int, KeyValuePair<int, string>>((KeyValuePair<int, KeyValuePair<int, string>> i) => i.Key, (KeyValuePair<int, KeyValuePair<int, string>> i) => i.Value).Values) { username = value.Value; Message.WriteInteger(value.Key); Message.WriteInteger(1); Message.WriteString((string.IsNullOrEmpty(username) ? string.Empty : username)); } } } }[/CODE] Can someone help me for this bug please? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
SerializeExtraData Item crash...
Top