Script command issue

hi ryan,

my plugin got this function:

def sort_items_guild_storage():
     global running
     global thread
     if running != False:
         return
     running = ‘sort_items_guild_storage’
     log(‘[%s] %s: started’ % (name, get_runni    ng_job()))
     thread = Thread(target=sort_items, args=(‘guild_storage’,))
     thread.start()

this is a part of my town script:

walk,3565,2024,0
walk,3571,2006,0
walk,3572,1991,0
walk,3576,1989,0
walk,3583,1969,0
DoGuildStorage
sort_items_guild_storage
walk,3576,1989,0
DoStorage
walk,3555,1990,0

when the bot comes to my custom command i get the following:

[12:06:12] Python Error: sort_items_guild_storage() takes 0 positional arguments but 1 was given
[12:06:12] Script: Command not found [sort_items_guild_storage]

what am i doing wrong?

regards

You’re missing the args parameter in your python script.

(town/walk)script commands require an args parameter at the python function? what type? list?

def sort_items_guild_storage(args):

thx. is it a list?

Yes, it’s a list.