t.playing = playing
t.playlist_index = index
t.repeat = repeat
-cmd_THING_MUSICPLAYER_SETTINGS.argtypes = 'int:pos bool int:nonneg bool'
+cmd_THING_MUSICPLAYER_SETTINGS.argtypes = 'int:pos bool int bool'
def cmd_THING_MUSICPLAYER_PLAYLIST_ITEM(game, thing_id, title, length):
t = game.get_thing(thing_id)
if not arg.isdigit() or int(arg) < 1:
raise ArgError('Argument must be positive integer.')
args += [int(arg)]
+ elif tmpl == 'int':
+ try:
+ args += [int(arg)]
+ except ValueError:
+ raise ArgError('Argument must be integer.')
elif tmpl == 'bool':
if not arg.isdigit() or int(arg) not in (0, 1):
raise ArgError('Argument must be 0 or 1.')