Can't load scripts

Please post any questions about developing your plugin here. Please use the search function before posting!
SkinN
Junior Member
Posts: 25
Joined: Fri Jul 19, 2013 7:29 am

Can't load scripts

Postby SkinN » Tue Mar 25, 2014 8:03 pm

Hi

For the first time I start using SP on CS:GO, and I cannot load any scripts, I believe I'm doing it right with the command "sp load <script>" but it always outputs "Unable to load...".
Am I doing something wrong?

SkinN!
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Tue Mar 25, 2014 8:24 pm

Yes, sp load <script> is correct. Could you show us your script?

You should also go to ../cfg/source-python/core_settings.ini and adapt LOG_SETTINGS.
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Tue Mar 25, 2014 8:55 pm

Also, your scripts need to be located at ../addons/source-python/plugins/<scriptname>/<scriptname>.py
SkinN
Junior Member
Posts: 25
Joined: Fri Jul 19, 2013 7:29 am

Postby SkinN » Wed Mar 26, 2014 5:59 am

Ayuto wrote:Yes, sp load <script> is correct. Could you show us your script?

You should also go to ../cfg/source-python/core_settings.ini and adapt LOG_SETTINGS.


Well I haven't done anything really, but I did tried one of the addons I found in the forum and didn't work, the one that removes the disconnect messages, and the one I tried myself was a simple one using ES module, since the one that I found in the forum had ES module in it, perhaps doesn't work?
SkinN
Junior Member
Posts: 25
Joined: Fri Jul 19, 2013 7:29 am

Postby SkinN » Wed Mar 26, 2014 6:00 am

satoon101 wrote:Also, your scripts need to be located at ../addons/source-python/plugins/<scriptname>/<scriptname>.py


I did follow that path I figured was the same as ES is, and also the plugins folder was pretty obvious, as well the readme there has it explained.
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Wed Mar 26, 2014 11:32 am

The most plugins on this forum are probably out-dated due to the development. Your script doesn't load, because an error was raised. To show the error, you have to edit the LOG_SETTINGS. ;)
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Wed Mar 26, 2014 12:33 pm

SkinN wrote:Well I haven't done anything really, but I did tried one of the addons I found in the forum and didn't work, the one that removes the disconnect messages, and the one I tried myself was a simple one using ES module, since the one that I found in the forum had ES module in it, perhaps doesn't work?

Yes, the one with the disconnect messages imports es, which does not exist in SP. Again, though, I will echo Ayuto that if you setup your logging settings, you would get a more detailed error. I have been meaning to change the defaults for the logging settings, but keep forgetting.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 23 guests