Raised This Month: $66 Target: $400
 16% 

[ANY] SteamWorks


Post New Thread Reply   
 
Thread Tools Display Modes
joao7yt
Senior Member
Join Date: Nov 2014
Location: Brazil
Old 12-10-2019 , 22:50   Re: [ANY] SteamWorks
Reply With Quote #721

It seems like HTTP Requests are not working if they are inside OnPluginStart() and the server is still starting... if I reload the plugin after the server has fully loaded, using "sm plugins reload <pluginName>", then the HTTP Request retrieves the wanted data just fine. It has something to do with the server yet loading when an HTTP Request is called.

I didn't want to use a timer to fix it... Do you know if it's fixable or if there's an alternative to OnPluginStart(), some ServerLoaded() callback?
joao7yt is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Brexit
Old 12-10-2019 , 23:54   Re: [ANY] SteamWorks
Reply With Quote #722

Try this forward
https://sm.alliedmods.net/new-api/so...lPluginsLoaded
__________________
Lux is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 12-16-2019 , 00:13   Re: [ANY] SteamWorks
Reply With Quote #723

Quote:
Originally Posted by joao7yt View Post
It seems like HTTP Requests are not working if they are inside OnPluginStart() and the server is still starting... if I reload the plugin after the server has fully loaded, using "sm plugins reload <pluginName>", then the HTTP Request retrieves the wanted data just fine. It has something to do with the server yet loading when an HTTP Request is called.

I didn't want to use a timer to fix it... Do you know if it's fixable or if there's an alternative to OnPluginStart(), some ServerLoaded() callback?
SteamWorks_IsLoaded()? Alternatively SteamWorks_SteamServersConnected().
KyleS is offline
joao7yt
Senior Member
Join Date: Nov 2014
Location: Brazil
Old 12-16-2019 , 09:03   Re: [ANY] SteamWorks
Reply With Quote #724

Quote:
Originally Posted by KyleS View Post
SteamWorks_IsLoaded()? Alternatively SteamWorks_SteamServersConnected().
SteamWorks_SteamServersConnected() did the trick, thanks.
joao7yt is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 12-17-2019 , 16:35   Re: [ANY] SteamWorks
Reply With Quote #725

Quote:
Originally Posted by joao7yt View Post
SteamWorks_SteamServersConnected() did the trick, thanks.
Remember it's called every time Steam reconnects - use a static or something within the gfwd to only initialize once.
KyleS is offline
joao7yt
Senior Member
Join Date: Nov 2014
Location: Brazil
Old 12-17-2019 , 17:03   Re: [ANY] SteamWorks
Reply With Quote #726

Quote:
Originally Posted by KyleS View Post
Remember it's called every time Steam reconnects - use a static or something within the gfwd to only initialize once.
Thanks. Is there somewhere I can get a full list of SteamWorks callbacks and their descriptions?
joao7yt is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 12-19-2019 , 21:02   Re: [ANY] SteamWorks
Reply With Quote #727

Quote:
Originally Posted by joao7yt View Post
Thanks. Is there somewhere I can get a full list of SteamWorks callbacks and their descriptions?
The include file and I guess the official Valve documentation. There's a couple internal things but they're mostly documented.
KyleS is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:26.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode