[SOLVED] [Command] Rasta RP

Status
Not open for further replies.

Dayron1234

Rapnameiszero,cuzIhavezero,toleranceforidiots
Jun 30, 2010
772
35
Ok so I coded a new command today as I was bored for my RP that I re-opened lol anyways the error is the case "mod": here is the command:

Code:
#region :moderator <user>
                    case "mod":
                        {
                            if (_Rank < 7)
                            {
                                virtualUser User = userManager.getUser(args[1]);
                                Room.sendSaying(roomUser, "*Uses there god-Like powers to make " + args[1] + " a Moderator*");
                                {
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        dbClient.runQuery("UPDATE users SET rank = rank '6' WHERE name = '" + _Username);
                                    }
                                    break;
                                }
                            }

                        }
                                    #endregion

If you want pic then reply and Error code is:


Error 1 Control cannot fall through from one case label ('case "mod":') to another C:\Users\Benny\Desktop\Rasta RP Emulator\Source\Virtual\Users\virtualUser.cs 5490 21 Holograph Emulator
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,933
Try this:
PHP:
                    #region :moderator <user>
                    case "mod":
                        {
                            if (_Rank > 6)
                            {
                                virtualUser User = userManager.getUser(args[1]);
                                Room.sendSaying(roomUser, "*Uses there god-like powers to make " + User._Username + " a moderator*");
                                {
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        dbClient.runQuery("UPDATE users SET rank = rank '6' WHERE name = '" + User._Username + "';");
                                    }
                                }
                            }
                            break;
                        }
                    #endregion
 
Status
Not open for further replies.

Users who are viewing this thread

Top