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
[HELP] Fixing Error [HELP]
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="ProxyHider" data-source="post: 283072" data-attributes="member: 39280"><p style="text-align: center">Hello Guys!</p> <p style="text-align: center">Is There Someone Knows How To Fix This Command Error?</p> <p style="text-align: center">Codes :</p> <p style="text-align: center">The Error Shows</p> <p style="text-align: center">[CODE]The label 'case "revive":' already occurs in this switch statement C:\xampp\htdocs\FlareRP\Game\Misc\Chat\ChatCommands.cs[/CODE]</p> <p style="text-align: center">Command Code :revive</p> <p style="text-align: center">[CODE]#region :revive x</p> <p style="text-align: center">case "revive":</p> <p style="text-align: center"> {</p> <p style="text-align: center"> if (Session.CharacterInfo.GroupID == 4 && Session.CharacterInfo.Working == 1)</p> <p style="text-align: center"> {</p> <p style="text-align: center"></p> <p style="text-align: center"></p> <p style="text-align: center"> if (Bits.Length < 2)</p> <p style="text-align: center"> {</p> <p style="text-align: center"> Session.SendData(RoomChatComposer.Compose(Actor.Id, "Invalid syntax - :revive <username>", 0, ChatType.Whisper));</p> <p style="text-align: center"> return true;</p> <p style="text-align: center"> }</p> <p style="text-align: center"></p> <p style="text-align: center"></p> <p style="text-align: center"> string Username = UserInputFilter.FilterString(Bits[1].Trim());</p> <p style="text-align: center"> Session TargetSession = SessionManager.GetSessionByCharacterId(CharacterResolverCache.GetUidFromName(Username));</p> <p style="text-align: center"> Username = TargetSession.CharacterInfo.Username;</p> <p style="text-align: center"></p> <p style="text-align: center"></p> <p style="text-align: center"> if (TargetSession == null || !TargetSession.InRoom)</p> <p style="text-align: center"> {</p> <p style="text-align: center"> Session.SendData(RoomChatComposer.Compose(Actor.Id, "Could not find " + Username + " in this room!", 0, ChatType.Whisper));</p> <p style="text-align: center"> return true;</p> <p style="text-align: center"> }</p> <p style="text-align: center"></p> <p style="text-align: center"></p> <p style="text-align: center"> using (SqlDatabaseClient MySqlClient = SqlDatabaseManager.GetClient())</p> <p style="text-align: center"> {</p> <p style="text-align: center"> TargetSession.CharacterInfo.Unmute(MySqlClient);</p> <p style="text-align: center"> ModerationLogs.LogModerationAction(MySqlClient, Session, "Healed user from server (chat command)",</p> <p style="text-align: center"> "User '" + TargetSession.CharacterInfo.Username + "' (ID " + TargetSession.CharacterId + ").");</p> <p style="text-align: center"></p> <p style="text-align: center"></p> <p style="text-align: center"> }</p> <p style="text-align: center"> Instance.BroadcastMessage(RoomChatComposer.Compose(Actor.Id, "*Shocks " + Username + " with 1492 volts of energy*", 0, ChatType.Shout));</p> <p style="text-align: center"> TargetSession.SendData(RoomChatComposer.Compose(Actor.Id, "*Is able to talk*", 0, ChatType.Shout));</p> <p style="text-align: center"></p> <p style="text-align: center"></p> <p style="text-align: center"> }</p> <p style="text-align: center"> return true;</p> <p style="text-align: center"> }</p> <p style="text-align: center"> #endregion // HOSPITAL ONLY</p> <p style="text-align: center"> #endregion [/CODE]</p> <p style="text-align: center">Screenshots :</p> <p style="text-align: center">Error</p> <p style="text-align: center"><img src="http://i.imgur.com/sw7ffQs.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </p> <p style="text-align: center">Inside</p> <p style="text-align: center"><img src="http://i.imgur.com/JrFcMss.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </p> <p style="text-align: center">Thank You In Advance</p> <p style="text-align: center"></p> <p style="text-align: center"></p></blockquote><p></p>
[QUOTE="ProxyHider, post: 283072, member: 39280"] [CENTER]Hello Guys! Is There Someone Knows How To Fix This Command Error? Codes : The Error Shows [CODE]The label 'case "revive":' already occurs in this switch statement C:\xampp\htdocs\FlareRP\Game\Misc\Chat\ChatCommands.cs[/CODE] Command Code :revive [CODE]#region :revive x case "revive": { if (Session.CharacterInfo.GroupID == 4 && Session.CharacterInfo.Working == 1) { if (Bits.Length < 2) { Session.SendData(RoomChatComposer.Compose(Actor.Id, "Invalid syntax - :revive <username>", 0, ChatType.Whisper)); return true; } string Username = UserInputFilter.FilterString(Bits[1].Trim()); Session TargetSession = SessionManager.GetSessionByCharacterId(CharacterResolverCache.GetUidFromName(Username)); Username = TargetSession.CharacterInfo.Username; if (TargetSession == null || !TargetSession.InRoom) { Session.SendData(RoomChatComposer.Compose(Actor.Id, "Could not find " + Username + " in this room!", 0, ChatType.Whisper)); return true; } using (SqlDatabaseClient MySqlClient = SqlDatabaseManager.GetClient()) { TargetSession.CharacterInfo.Unmute(MySqlClient); ModerationLogs.LogModerationAction(MySqlClient, Session, "Healed user from server (chat command)", "User '" + TargetSession.CharacterInfo.Username + "' (ID " + TargetSession.CharacterId + ")."); } Instance.BroadcastMessage(RoomChatComposer.Compose(Actor.Id, "*Shocks " + Username + " with 1492 volts of energy*", 0, ChatType.Shout)); TargetSession.SendData(RoomChatComposer.Compose(Actor.Id, "*Is able to talk*", 0, ChatType.Shout)); } return true; } #endregion // HOSPITAL ONLY #endregion [/CODE] Screenshots : Error [IMG]http://i.imgur.com/sw7ffQs.png[/IMG] Inside [IMG]http://i.imgur.com/JrFcMss.png[/IMG] Thank You In Advance [/CENTER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[HELP] Fixing Error [HELP]
Top