Search found 1776 matches

by satoon101
Tue Feb 04, 2014 4:44 am
Forum: Plugin Development Support
Topic: import from same folder
Replies: 2
Views: 3363

Sorry for the double post, but I also need to mention that config is a Source.Python package. This sort of thing is one reason why we decided to not add the plugin to sys.path. It could become very difficult to discern between which config you are wanting to import from. Requiring full import paths ...
by satoon101
Tue Feb 04, 2014 4:25 am
Forum: Plugin Development Support
Topic: import from same folder
Replies: 2
Views: 3363

Source.Python, unlike EventScripts, does not add the loaded plugin's package to sys.path. Therefor, you must either be explicit and use the full import path: from <package>.config import * or simply use a period . to denote going up one level from the current module: from .config import * Also, with...
by satoon101
Mon Feb 03, 2014 10:19 pm
Forum: Plugin Development Support
Topic: get_engine_interface
Replies: 1
Views: 2560

We decided that importing a function whose sole purpose is to retrieve the instance of an interface was unnecessary. So, instead, we now just expose the interface itself as the imported object:

Code: Select all

from engine_c import GameEngine
by satoon101
Mon Jan 27, 2014 3:44 pm
Forum: General Discussion
Topic: New conversion_c module
Replies: 3
Views: 3711

You do not import the object types from conversions_c. You import converting functions: # Converting to an index from other types index_from_edict index_from_basehandle index_from_inthandle index_from_pointer index_from_userid index_from_playerinfo # Converting to an Edict instance from other types ...
by satoon101
Mon Jan 27, 2014 1:55 pm
Forum: General Discussion
Topic: New conversion_c module
Replies: 3
Views: 3711

CPlayerGenerator should just be imported itself, still from player_c: from player_c import CPlayerGenerator You then iterate over that to get all PlayerInfo instances. We are removing the leading "C" from the object names, so that will probably become PlayerGenerator in the future. If you have a use...
by satoon101
Mon Jan 27, 2014 4:32 am
Forum: News & Announcements
Topic: New Update!!
Replies: 4
Views: 6921

We will work on updating the Wiki, that is all the documentation I think we truly need. I would prefer if we kept documentation to one location instead of spreading it across multiple sites. If you have specific questions, feel free to ask them in the appropriate forum.

Satoon
by satoon101
Mon Jan 27, 2014 1:01 am
Forum: News & Announcements
Topic: New Update!!
Replies: 4
Views: 6921

New Update!!

In light of all the changes recently, I decided to go ahead and post a new build. https://github.com/Source-Python-Dev-Team/Source.Python/releases Most things should be working fairly well, but there are a lot of changes that now need to be made to the Wiki. If you have any issues with this build, p...
by satoon101
Sat Jan 25, 2014 11:04 pm
Forum: Whatever
Topic: Sorting items in dictionary
Replies: 3
Views: 5953

I haven't looked through all your code, but I did test using the other classes as well on that page. The thing I notice is that it is sorting by the first number in the level. So, since 1 is less than 3, 17 is shown lower than 3. If you look at "wizard", you will see this as well. 1 is les...
by satoon101
Wed Jan 22, 2014 4:56 pm
Forum: Plugin Development Support
Topic: Subclassing an entity - C++ signature error
Replies: 9
Views: 7302

http://www.sourcepython.com/showwiki.php?title=Wiki:CEdict

Methods of a class are also attributes. You can use the BaseEntity class to then call all of the CEdict methods by using the same names.

Satoon
by satoon101
Tue Jan 21, 2014 10:23 pm
Forum: Plugin Development Support
Topic: Subclassing an entity - C++ signature error
Replies: 9
Views: 7302

Yes, that is how inheritance works. As long as you do not override the inherited class' attributes, properties, and methods, those items will be exactly as the would be for the parent class. As another example, both BaseEntity and PlayerEntity have an "instances" property. We use this prop...
by satoon101
Tue Jan 21, 2014 4:41 pm
Forum: Plugin Development Support
Topic: Subclassing an entity - C++ signature error
Replies: 9
Views: 7302

I will attempt to do my best to explain. Yes, __new__ gets called when the object is created, and allows us to manipulate object creation. __new__ is also a "class" method, while __init__ is an "instance" method. When you override a method, and then call super(<class>, <instance>...
by satoon101
Tue Jan 21, 2014 7:30 am
Forum: Plugin Development Support
Topic: Subclassing an entity - C++ signature error
Replies: 9
Views: 7302

A couple things with this. First, currently we do not have the ability to instantiate some of the objects with all the types we used to. We are still working on figuring out whether we want to handle things the same and how to handle the objects in general. At some point, inheriting will work perfec...
by satoon101
Tue Jan 21, 2014 6:36 am
Forum: Plugin Development Support
Topic: Source-Python will not load
Replies: 12
Views: 8669

Glad you got your compiling issues sorted. As for the error still being there, Ayuto did fix the issue we were having that required us to use the "get" method instead of just instantiating the object. He did fix the Python side as well, by removing the instances of CConVar.get(). You will need to up...
by satoon101
Mon Jan 20, 2014 9:16 pm
Forum: Plugin Development Support
Topic: Source-Python will not load
Replies: 12
Views: 8669

Very odd... Which Visual Studio are you using? Also, have you tried using Release instead of Debug? What exact steps have you been taking? Did you follow the tutorial?

Satoon
by satoon101
Mon Jan 20, 2014 8:22 pm
Forum: Plugin Development Support
Topic: Source-Python will not load
Replies: 12
Views: 8669

I honestly do not get that at all, even when trying to build in Debug mode. It would be preferable if you used Release instead, but that probably won't fix this issue for you. I would recommend just going ahead and installing either git or TortoiseGit. I prefer using Bash to execute the commands mys...
by satoon101
Mon Jan 20, 2014 7:00 pm
Forum: Plugin Development Support
Topic: Source-Python will not load
Replies: 12
Views: 8669

Ok, but the "master" is just the repo itself. In this state, it is "un-built", meaning you have to build your own binaries. If you do not do this, and simply upload the files, as is, to your server, you are only truly updating the Python API, and not the binaries themselves. You need to build the so...
by satoon101
Mon Jan 20, 2014 6:31 pm
Forum: Plugin Development Support
Topic: Source-Python will not load
Replies: 12
Views: 8669

Did you make your own build? We are in discussions about ConVars, but the current repository version does have a "get" method.

Satoon
by satoon101
Sun Jan 19, 2014 8:03 pm
Forum: General Discussion
Topic: PlayerEntity crashed csgo server
Replies: 10
Views: 9223

Yes, I have noticed this as well. This is from the internal changes being made. Until all the changes have been made, some things will be broken. Give us time, and we will get all of these fixed.

Satoon
by satoon101
Sat Jan 18, 2014 1:23 am
Forum: General Discussion
Topic: cs:go server crashes
Replies: 13
Views: 11881

Which version were you trying to compile for? Linux/Windows? OrangeBox/CSGO?

Satoon
by satoon101
Sat Jan 18, 2014 1:20 am
Forum: General Discussion
Topic: PlayerEntity crashed csgo server
Replies: 10
Views: 9223

Ok, figured out what "might" have been your sp is an unknown command issue. If you do not upload the newest translations from ../resource/source-python/translations/ , you will receive a KeyError, which we do not account for, and no error message will be shown. Please update your server's files and ...

Go to advanced search