print() doesn't display anything on the console

Please post any questions about developing your plugin here. Please use the search function before posting!
lime
Junior Member
Posts: 7
Joined: Fri Jul 22, 2016 11:45 pm

print() doesn't display anything on the console

Postby lime » Sun Jul 24, 2016 5:09 pm

I was able to get SP working in a Windows CS:GO Dedicated Server instance, but now I'm having another issue:

Code: Select all

def load():
    print("test1 loaded")


Doesn't print anything to the console when the plugin is loaded with 'sp plugin load test1'. I've had luck with SayText2 showing up on a connected client, but print() doesn't seem to produce any effect at all.

This is with csgo build #409.
lime
Junior Member
Posts: 7
Joined: Fri Jul 22, 2016 11:45 pm

Re: print() doesn't display anything on the console

Postby lime » Sun Jul 24, 2016 5:31 pm

I found 'core.echo_console', which appears to work as intended. Interested to know if print() is broken somehow or if the docs are out of date?
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: print() doesn't display anything on the console

Postby iPlayer » Sun Jul 24, 2016 5:45 pm

Side note: on CS:S print won't work on a listen server but works on a dedicated one.
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
User avatar
L'In20Cible
Project Leader
Posts: 1536
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: print() doesn't display anything on the console

Postby L'In20Cible » Sun Jul 24, 2016 9:01 pm

As far as I know, print is sending the data to stdout, how the server treat it is a different story. Interesting to know that on listen servers it doesn't echo it to the console. I guess we could add a print hook and manually redirect if the server is not dedicated.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 140 guests