ProxyHider
Member
- Nov 2, 2013
- 30
- 4
Hello Guys!
Is There Someone Knows How To Fix This Command Error?
Codes :
The Error Shows
Command Code :revive
Screenshots :
Error
Inside
Thank You In Advance
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:
#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
Error
Inside
Thank You In Advance