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

(steamworks) Receiving large Amounts of data


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dustinandband
Senior Member
Join Date: May 2015
Old 11-06-2021 , 20:33   (steamworks) Receiving large Amounts of data
Reply With Quote #1

I'm experimenting with steamworks, trying to retrieve stats for a game via sourcepawn.

The problem is the buffer size I need to store all the stats. Everything I've tried hasn't worked so far.

Code:
char sBody[20000];
[SM] Exception reported: Not enough space on the stack
Code:
char sBody[30000];
[SM] Exception reported: Instruction contained invalid parameter
Code:
char[] sBody = new char[iBufferSize];
[SM] Exception reported: Not enough space on the heap
The plugin is a test plugin edited from somewhere else, so excuse the sloppy code. The issue is in the "TimePlayed_OnHTTPResponse" function, trying to declare a character string that has enough space for iBufferSize (which is around 28627 ).

char[] sBody = new char[iBufferSize];

Spoiler
dustinandband is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 11-07-2021 , 08:48   Re: (steamworks) Receiving large Amounts of data
Reply With Quote #2

Add #pragma dynamic 20000 to increase the stacks space.
__________________
My plugins:
*None for now*


Steam:
naydef
Naydef 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 08:41.


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