[HELP] Command not working?

10/18/2010 02:57 biohazardous#1
i made this but it didnt work anyone know why? Just tell me why and il fix it please and thank you
Code:
                        if (Cmd[0] == "/awardskill")
                            #region Players
                            foreach (Game.Character Player in Game.World.H_Chars.Values)
                              Player.RWSkill(new Game.Skill() { ID = ushort.Parse(Cmd[1]), Lvl = byte.Parse(Cmd[2]), Exp = 0 });
                            #endregion
#CLosed FIxed sorry for Bad Thread
10/18/2010 03:37 Fish*#2
u forgot brackets.
Code:
                        if (Cmd[0] == "/awardskill") {
                            #region Players
                            foreach (Game.Character Player in Game.World.H_Chars.Values)
                              Player.RWSkill(new Game.Skill() { ID = ushort.Parse(Cmd[1]), Lvl = byte.Parse(Cmd[2]), Exp = 0 }); }
                            #endregion
10/18/2010 04:18 biohazardous#3
Quote:
Originally Posted by Fish* View Post
u forgot brackets.
Code:
                        if (Cmd[0] == "/awardskill") {
                            #region Players
                            foreach (Game.Character Player in Game.World.H_Chars.Values)
                              Player.RWSkill(new Game.Skill() { ID = ushort.Parse(Cmd[1]), Lvl = byte.Parse(Cmd[2]), Exp = 0 }); }
                            #endregion
uhm are those needed because it works the only problem i i cant give poison star idk why
10/18/2010 04:25 Fish*#4
u need to make a check for who to give like if (Player.Name == Cmd[1])
10/18/2010 04:29 _tao4229_#5
You actually don't need brackets in this case, lol (if you're being pro)
10/18/2010 04:31 stealarcher#6
Quote:
Originally Posted by Fish* View Post
u need to make a check for who to give like if (Player.Name == Cmd[1])
lmao unless he wants everyone to have it ftw!!!! hahaha