Quantcast
Channel: RaGEZONE - MMO Development Forums
Viewing all articles
Browse latest Browse all 33209

[Help] [HELP] Command Error [HELP]

$
0
0
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
Command Code :revive

Code:

#region :revive x
Code:

                    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


Screenshots :
Error

Inside

Viewing all articles
Browse latest Browse all 33209

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>