Page 1 of 1

can't put script with stringtable in autoexec.cfg

Posted: Fri Oct 03, 2014 11:44 am
by 8guawong

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:

Posted: Sun Oct 05, 2014 1:16 am
by satoon101
Thank you for reporting, working on a fix right now.

Posted: Sun Oct 05, 2014 5:04 am
by L'In20Cible
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.

Posted: Sun Oct 05, 2014 12:15 pm
by satoon101
Thanks, I had this fixed locally, but never got around to committing the changes last night.