Page 1 of 1

Can't load scripts

Posted: Tue Mar 25, 2014 8:03 pm
by SkinN
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!

Posted: Tue Mar 25, 2014 8:24 pm
by Ayuto
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.

Posted: Tue Mar 25, 2014 8:55 pm
by satoon101
Also, your scripts need to be located at ../addons/source-python/plugins/<scriptname>/<scriptname>.py

Posted: Wed Mar 26, 2014 5:59 am
by SkinN
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?

Posted: Wed Mar 26, 2014 6:00 am
by SkinN
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.

Posted: Wed Mar 26, 2014 11:32 am
by Ayuto
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. ;)

Posted: Wed Mar 26, 2014 12:33 pm
by satoon101
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.