Raised This Month: $51 Target: $400
 12% 

[ANY] SteamWorks


Post New Thread Reply   
 
Thread Tools Display Modes
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 01-14-2015 , 20:38   Re: [ANY] SteamWorks
Reply With Quote #241

Quote:
Originally Posted by DarkSoroush View Post
Bug:

When using "SteamWorks_SetHTTPRequestContextValue", if you try to send a negative number as data2, you later receive a -1 from data1.
For now my workaround was to send the negative number as data1 and other number which I know not going to be negative as the second context variable (data2).

Code:
SteamWorks_SetHTTPRequestContextValue(handle, 10, -200000);
Which callback? While I'm sure it's obvious to you, do you have a small-ish testcase?
KyleS is offline
DarkSoroush
Member
Join Date: Jan 2015
Old 01-16-2015 , 08:40   Re: [ANY] SteamWorks
Reply With Quote #242

Attached is a sample plugin and following is the result of loading it.

Code:
sm plugins load sample
SAMPLE PLUGIN: Setting 10 and -60 as HTTP Context Variables
[SM] Plugin Sample reloaded successfully.
SAMPLE PLUGIN: -1 and -60 are the active HTTP Context Variables
Attached Files
File Type: sp Get Plugin or Get Source (sample.sp - 105 views - 1.2 KB)
DarkSoroush is offline
DarkSoroush
Member
Join Date: Jan 2015
Old 01-17-2015 , 04:25   Re: [ANY] SteamWorks
Reply With Quote #243

Also, I have a question about the "SteamWorks_SetHTTPRequestGetOrPostParame ter" method.

Code:
Test(const String:id[])
{
    new Handle:hRequest = SteamWorks_CreateHTTPRequest(EHTTPMethod:k_EHTTPMethodGET, "http://google.com");
    SteamWorks_SetHTTPRequestGetOrPostParameter(hRequest, "Id", id);
}
In above code I have a "warning 213: tag mismatch" warning about "SteamWorks_SetHTTPRequestGetOrPostParame ter" method. Yet I dont know why. Can someone please help me out with this problem? Method's signature in include file is as follow:

Code:
native bool:SteamWorks_SetHTTPRequestGetOrPostParameter(Handle:hHandle, const String:sName[], const Strnig:sValue[]);
DarkSoroush is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 01-17-2015 , 05:57   Re: [ANY] SteamWorks
Reply With Quote #244

native bool:SteamWorks_SetHTTPRequestGetOrPostParame ter(Handle:hHandle, const String:sName[], const Strnig:sValue[]);

fix that include
__________________
Peace-Maker is offline
DarkSoroush
Member
Join Date: Jan 2015
Old 01-17-2015 , 07:19   Re: [ANY] SteamWorks
Reply With Quote #245

Peace-Maker, you have a keen eye for detail. I read that like 5 times before posting here and never suspected it.
Any way, both "SteamWorks_SetHTTPRequestHeaderValue" and "SteamWorks_SetHTTPRequestGetOrPostParame ter" should be fixed.

Code:
native bool:SteamWorks_SetHTTPRequestHeaderValue(Handle:hHandle, const String:sName[], const String:sValue[]);
native bool:SteamWorks_SetHTTPRequestGetOrPostParameter(Handle:hHandle, const String:sName[], const String:sValue[]);
DarkSoroush is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 01-17-2015 , 14:16   Re: [ANY] SteamWorks
Reply With Quote #246

Quote:
Originally Posted by DarkSoroush View Post
Attached is a sample plugin and following is the result of loading it.

Code:
sm plugins load sample
SAMPLE PLUGIN: Setting 10 and -60 as HTTP Context Variables
[SM] Plugin Sample reloaded successfully.
SAMPLE PLUGIN: -1 and -60 are the active HTTP Context Variables
Many thanks

Code:
sm plugins reload swtest
[Thread 0xe94c2b40 (LWP 32694) exited]
SAMPLE PLUGIN: Setting 10 and -60 as HTTP Context Variables
[New Thread 0xe5affb40 (LWP 32702)]
[SM] Plugin Sample reloaded successfully.
[New Thread 0xe59feb40 (LWP 32703)]
SAMPLE PLUGIN: 10 and -60 are the active HTTP Context Variables
[New Thread 0xe94c2b40 (LWP 32708)]
https://github.com/KyleSanderson/Ste...d34403fd850109
KyleS is offline
Sarabveer
Veteran Member
Join Date: Feb 2014
Old 01-17-2015 , 15:56   Re: [ANY] SteamWorks
Reply With Quote #247

Quote:
Originally Posted by KyleS View Post
Many thanks

Code:
sm plugins reload swtest
[Thread 0xe94c2b40 (LWP 32694) exited]
SAMPLE PLUGIN: Setting 10 and -60 as HTTP Context Variables
[New Thread 0xe5affb40 (LWP 32702)]
[SM] Plugin Sample reloaded successfully.
[New Thread 0xe59feb40 (LWP 32703)]
SAMPLE PLUGIN: 10 and -60 are the active HTTP Context Variables
[New Thread 0xe94c2b40 (LWP 32708)]
https://github.com/KyleSanderson/Ste...d34403fd850109
Can we get a compiled Windows and Linux binary?
__________________
Sarabveer is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 01-17-2015 , 17:23   Re: [ANY] SteamWorks
Reply With Quote #248

Quote:
Originally Posted by Sarabveer View Post
Can we get a compiled Windows and Linux binary?
Doing a little bit of house cleaning, the usual suspects will hopefully give me a shout before they put any effort in
KyleS is offline
Sarabveer
Veteran Member
Join Date: Feb 2014
Old 01-17-2015 , 23:27   Re: [ANY] SteamWorks
Reply With Quote #249

Quote:
Originally Posted by KyleS View Post
Doing a little bit of house cleaning, the usual suspects will hopefully give me a shout before they put any effort in
I'm too lazy to download the HL2SDK and setup Visual Studio.
__________________

Last edited by Sarabveer; 01-18-2015 at 12:34.
Sarabveer is offline
Sarabveer
Veteran Member
Join Date: Feb 2014
Old 01-18-2015 , 12:28   Re: [ANY] SteamWorks
Reply With Quote #250

Sike, I ain't lazy.

Compiled @ e3608027009bcbb9c9e00ac227a9b077944f6187

Compiled With: Visual Studio Express 2013

SourceMod 1.6.3
MetaMod 1.10.4
SteamWorks SDK 1.31
HL2SDK2013 @ 28b43b06249837c1517db1468af14678080715f6

Here is a compiled binary for Windows. I don't have a linux machine to compile on.
Attached Files
File Type: dll SteamWorks.ext.dll (115.0 KB, 87 views)
__________________

Last edited by Sarabveer; 01-18-2015 at 17:10.
Sarabveer is offline
Reply



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 16:00.


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