+ elif tmpl == string_string:
+ args += [arg]
+ elif tmpl[:len(string_string) + 1] == string_string + ':':
+ if not hasattr(self.game, 'get_string_options'):
+ raise ArgError('No string option directory.')
+ string_option_type = tmpl[len(string_string) + 1:]
+ options = self.game.get_string_options(string_option_type)
+ if options is None:
+ raise ArgError('Unknown string option type.')
+ if arg not in options:
+ msg = 'Argument #%s must be one of: %s' % (i + 1, options)
+ raise ArgError(msg)
+ args += [arg]