GetStringArgument() public static méthode

Retrieves a string argument from the given input string. This argument should always be the last argument in the line, as this will retrieve the rest of the input string after all previous arguments.
public static GetStringArgument ( string line, int index ) : PolaMUD.Argument
line string The input string
index int The index of the desired argument (1 is always the command itself)
Résultat PolaMUD.Argument
Exemple #1
0
        public bool CommandAload(Player user, Command command, string text)
        {
            text = Parser.GetStringArgument(text, 2).Text;

            Area area = new Area();

            area.Load(text);

            return(true);
        }
Exemple #2
0
        public bool CommandSay(Player user, Command command, string text)
        {
            text = Parser.GetStringArgument(text, 2).Text;

            foreach (Player player in user.Room.Contents)
            {
                player.SendMessage(Colors.GREEN + user.Name + " says '" + text + "'\n\r", "dupe");
            }

            return(true);
        }