Page 1 of 2

Aug 2 - New Release!!

Posted: Sun Aug 02, 2015 4:02 am
by satoon101
A new release has just been posted. There have been a lot of changes since the last release almost a month ago. The highlights are as follows:

  • Implemented Left4Dead2 support!!

  • Implemented Pre-Event functionality and modified the Event decorator:
  • Made some changes to the exposed member function virtual hooking system and added more member functions that are able to be hooked
  • Exposed IServer functionality

  • Added setting player names with PlayerEntity.name

  • Fixed some errors and some crashes


For a full change log, look here:
https://github.com/Source-Python-Dev-Team/Source.Python/compare/37a0444...31d721f

Posted: Sun Aug 02, 2015 9:48 am
by nullable
After update sourcepython:

Syntax: Select all

[Source.Python] Loading...
failed to dlopen /home/csgoserver/serverfiles/csgo/addons/source-python/bin/core.so error=/home/csgoserver/serverfiles/csgo/addons/source-python/bin/core.so: undefined symbol: _ZTI18INetChannelHandler
===========================================
[SP-LOADER] Could not load the /home/csgoserver/serverfiles/csgo/addons/source-python/bin/core.so!
===========================================
Failed to load plugin "addons/source-python"


How to fix it?

Posted: Sun Aug 02, 2015 1:49 pm
by Ayuto
I have supplied a fix for that, so we just need to recompile CS:GO and the issue should be solved. https://github.com/alliedmodders/hl2sdk/pull/14

Posted: Sun Aug 02, 2015 6:46 pm
by nullable
Can you update this release or I need waiting next? :)

Posted: Sun Aug 02, 2015 7:23 pm
by satoon101
I will update it tonight when I get home. Sorry about that, I didn't test all of the Linux builds to verify they loaded on the server. I will do that tonight before updating the release.

Posted: Mon Aug 03, 2015 1:10 am
by satoon101
Ok, it's updated. I included the updates from today in the release, as well. For the time being, I left out BMS, since there is an undefined symbol error with it on Linux we need to fix. Once that is fixed, I will add the BMS build to the release page.

Posted: Mon Aug 03, 2015 5:27 am
by nullable
After update:

Syntax: Select all

[SP] Caught an Exception: 
Traceback (most recent call last):
File '../addons/source-python/packages/source-python/commands/manager.py', line 151, in __call__
return_value = callback(*args)
File '../addons/source-python/packages/source-python/plugins/command.py', line 217, in call_command
self[sub_command](*args)
File '../addons/source-python/packages/source-python/plugins/command.py', line 355, in reload_plugin
self.unload_plugin(plugin_name)
File '../addons/source-python/packages/source-python/plugins/command.py', line 333, in unload_plugin
del self.manager[plugin_name]
File '../addons/source-python/packages/source-python/plugins/manager.py', line 150, in __delitem__
self._remove_modules(plugin_name)
File '../addons/source-python/packages/source-python/plugins/manager.py', line 187, in _remove_modules
self._remove_module(module)
File '../addons/source-python/packages/source-python/plugins/manager.py', line 212, in _remove_module
instance._unload_instance()
File '../addons/source-python/packages/source-python/events/__init__.py', line 72, in _unload_instance
event_manager.unregister_for_event(event_name, self._callback)
File '../addons/source-python/packages/source-python/events/manager.py', line 75, in unregister_for_event
'Event '{0}' is not registered'.format(event_name))

ValueError: Event '<function cs_win_panel_match at 0xad726344>' is not registered


How to fix it?

Posted: Mon Aug 03, 2015 5:53 am
by nullable
nullable wrote:After update:

Syntax: Select all

[SP] Caught an Exception: 
Traceback (most recent call last):
File '../addons/source-python/packages/source-python/commands/manager.py', line 151, in __call__
return_value = callback(*args)
File '../addons/source-python/packages/source-python/plugins/command.py', line 217, in call_command
self[sub_command](*args)
File '../addons/source-python/packages/source-python/plugins/command.py', line 355, in reload_plugin
self.unload_plugin(plugin_name)
File '../addons/source-python/packages/source-python/plugins/command.py', line 333, in unload_plugin
del self.manager[plugin_name]
File '../addons/source-python/packages/source-python/plugins/manager.py', line 150, in __delitem__
self._remove_modules(plugin_name)
File '../addons/source-python/packages/source-python/plugins/manager.py', line 187, in _remove_modules
self._remove_module(module)
File '../addons/source-python/packages/source-python/plugins/manager.py', line 212, in _remove_module
instance._unload_instance()
File '../addons/source-python/packages/source-python/events/__init__.py', line 72, in _unload_instance
event_manager.unregister_for_event(event_name, self._callback)
File '../addons/source-python/packages/source-python/events/manager.py', line 75, in unregister_for_event
'Event '{0}' is not registered'.format(event_name))

ValueError: Event '<function cs_win_panel_match at 0xad726344>' is not registered


How to fix it?


As I understand all events are not working now.

Posted: Mon Aug 03, 2015 6:11 am
by Ayuto
You need to update your plugin to use the new syntax for the Event decorator.

Syntax: Select all

from events import Event

@Event('player_spawn')
def player_spawn(event):
pass

Posted: Mon Aug 03, 2015 6:45 am
by nullable
In new version of plugin set player.name are not working:

Syntax: Select all

player.name = 'Test'

After change name the player is disconnect from server.

Is it possible to fix it?

Posted: Mon Aug 03, 2015 2:17 pm
by satoon101
Updated the release to include BMS build.

nullable wrote:In new version of plugin set player.name are not working:
[PYTHON]player.name = 'Test'[/PYTHON]
After change name the player is disconnect from server.

Is it possible to fix it?

We'll have to look into why that is happening. For reference, what game are you testing with and what OS is the server on?

Posted: Mon Aug 03, 2015 3:00 pm
by nullable
Game: CSGO
Server: Linux (Ubuntu)
Event: player_activate

Posted: Mon Aug 03, 2015 5:51 pm
by Ayuto
Just tested CS:GO on Windows and Linux and was unable to reproduce the issue. Could you please post the script you were using?

Posted: Sun Aug 09, 2015 5:06 pm
by satoon101
We just posted a new build. We realize that it has only been 6 days since the last build, and that there were only 10 commits since then. However, there were major changes to the EntityPreHook/EntityPostHook system that caused us to release this new build.
http://forums.sourcepython.com/showthread.php?904


Besides the entity hook changes, there were also speed improvements done in the get_key_value_<type> methods. For a full rundown of the latest 10 updates, see here:
https://github.com/Source-Python-Dev-Team/Source.Python/compare/31d721f...7c159ad


As always, you can find the releases here:
https://github.com/Source-Python-Dev-Team/Source.Python/releases

Posted: Wed Aug 12, 2015 7:20 pm
by Kakkoii
Hello, I've been looking around Source.Python, however I am unable to find a list of game that are supported. I was wondering if the game Blade Symphonyis supported?

Posted: Wed Aug 12, 2015 7:36 pm
by satoon101
Hello, and welcome :) Unfortunately, we do not have support for Blade Symphony at this time. We can look to add support, though. If/when we do, we would certainly appreciate your help with game specific data, especially weapons.

The currently supported games are:
  • BlackMesa
  • Counter-Strike: Source
  • Counter-Strike: Global Offensive
  • Day of Defeat: Source
  • Half-Life 2 (and the episodes)
  • Half-Life 2: DeathMatch
  • Left4Dead 2
  • Portal (not Portal 2, yet)
  • Team Fortress 2

Posted: Wed Aug 12, 2015 7:55 pm
by Kakkoii
I will help as much as I can. Currently I am in the process of learning Python, I look forward to seeing it get support.

Posted: Thu Aug 13, 2015 11:14 am
by Mahi
Kakkoii wrote:I will help as much as I can. Currently I am in the process of learning Python, I look forward to seeing it get support.
Are you, by any chance, from r/learnpython? :D

Posted: Thu Aug 13, 2015 8:03 pm
by Kakkoii
Mahi wrote:
Kakkoii wrote:I will help as much as I can. Currently I am in the process of learning Python, I look forward to seeing it get support.
Are you, by any chance, from r/learnpython? :D

No I was looking around SourceMod and was considering learning C for SourcePawn, but I'd rather start with an OOP language to then learn C++.

Posted: Thu Aug 13, 2015 9:05 pm
by Mahi
Kakkoii wrote:
Mahi wrote:
Kakkoii wrote:I will help as much as I can. Currently I am in the process of learning Python, I look forward to seeing it get support.
Are you, by any chance, from r/learnpython? :D

No I was looking around SourceMod and was considering learning C for SourcePawn, but I'd rather start with an OOP language to then learn C++.
Ah, I just met someone with really similar name on r/learnpython, talking about CS:GO programming with Python :D But welcome to the forums, I promise you won't regret choosing SP over SM, Python is just so much more awesome.