AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   (steamworks) Receiving large Amounts of data (https://forums.alliedmods.net/showthread.php?t=335080)

dustinandband 11-06-2021 20:33

(steamworks) Receiving large Amounts of data
 
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

Naydef 11-07-2021 08:48

Re: (steamworks) Receiving large Amounts of data
 
Add #pragma dynamic 20000 to increase the stacks space.


All times are GMT -4. The time now is 04:59.

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