void Say_Sfx_Command(string[] param) { string name; int interval; if (param.Length > 1) { name = param[0]; interval = int.Parse(param[1]); screen.SetDialogSfx(name); screen.SetSfxInterval(interval); return; } else { bool result = int.TryParse(param[0], out interval); if (result) { screen.SetSfxInterval(interval); return; } else { name = param[0]; screen.SetDialogSfx(name); return; } } }