ExampleMod.ExampleMod.SoundCommand C# (CSharp) Method

SoundCommand() private method

private SoundCommand ( string args ) : void
args string
return void
        private void SoundCommand(string[] args)
        {
            if (args.Length < 2)
            {
                Main.NewText("Usage: /sound type style");
                return;
            }
            int type;
            if (!Int32.TryParse(args[0], out type))
            {
                Main.NewText(args[0] + " is not an integer");
                return;
            }
            int style;
            if (!Int32.TryParse(args[1], out style))
            {
                Main.NewText(args[1] + " is not an integer");
                return;
            }
            Main.PlaySound(type, -1, -1, style);
        }