can't put script with stringtable in autoexec.cfg

Please post any questions about developing your plugin here. Please use the search function before posting!
8guawong
Senior Member
Posts: 148
Joined: Sat Sep 20, 2014 3:06 am

can't put script with stringtable in autoexec.cfg

Postby 8guawong » Fri Oct 03, 2014 11:44 am

Code: Select all

[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/packages/source-python/plugins/manager.py", line 72, in __missing__
    instance = self.instance(plugin_name, self.base_import)
  File "../addons/source-python/packages/source-python/plugins/instance.py", line 82, in __init__
    self._plugin = import_module(import_name)
  File "../addons/source-python/plugins/cheer/cheer.py", line 15, in <module>
    dl.add("sound/cheer/cheer_1.mp3")
  File "../addons/source-python/packages/source-python/stringtables/downloads.py", line 44, in add
    _downloadables_list._add_to_download_table(item)
  File "../addons/source-python/packages/source-python/stringtables/downloads.py", line 76, in _add_to_download_table
    self.download_table.add_string(item, item)

AttributeError: 'NoneType' object has no attribute 'add_string'


script loads fine when loaded manually :confused:
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sun Oct 05, 2014 1:16 am

Thank you for reporting, working on a fix right now.
Image
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Sun Oct 05, 2014 5:04 am

Fixed. This was happening cause there is no "downloadables" table when there is no map running on the server. Adding a simple check that the table is valid when adding a file to it should be sufficient enough to fix the issue since it will still be called any time soon by the "server_spawn" event.
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sun Oct 05, 2014 12:15 pm

Thanks, I had this fixed locally, but never got around to committing the changes last night.
Image

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 124 guests