Coding Problems

Status
Not open for further replies.

Polomikey

Member
Sep 27, 2010
325
0
Hello guys this is a really simple Post but i need help because everytime i code a new command and i type in case "Earthquake its a red line under the case code like wtf? i am doing something wrong ?

Screenshot
1299886515461566780897.png
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
I typed this in detail before but clicked X, so i'l type this fast.

1) You have an extra bracket that is not needed.
2) Your database query is out of the database client loop.
3) You are refreshing their appearance for nothing?
4) You haven't even sent them to the hospital?
5) You haven't started the loopers to make their timer activate.
6) You have an extra "User." statement on the database query.
7) Also, if this is meant to kill the whole room, it will not, it will only kill a targeted player.

Command should look like this(I'M GUESSING):

PHP:
#region :earthquake
                    case "earthquake":
                        {
                            if (_Rank > 6)
                            {
                                virtualUser User = userManager.getUser(args[1]);
                                {
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        Room.sendSaying(roomUser, "*uses thier god-like powers to make " + User._Username + "Causing a Earthquake*");
                                        User.sendData("B!" + "There's a earthquake Happening Run!" + Convert.ToChar(2));
                                        dbClient.runQuery("UPDATE users SET dead = '1', time_dead = '5' WHERE name = '" + User._Username + "'");
                                    }
                                }
                            }
                            break;
                        }
                    #endregion
 
Status
Not open for further replies.

Users who are viewing this thread

Top