Raised This Month: $ Target: $400
 0% 

Solved stack error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 05-09-2021 , 13:51   Re: stack error
Reply With Quote #2

You will get the same error on those lines too:
PHP Code:
        new szTempName[MAX_SKINS][256]
        new 
szTempLocation[MAX_SKINS][256]
        new 
szTempPreview[MAX_SKINS][256
because every variable has MAX_SKINS rows ( 9 ), each row has 256 lenght: 9 x 256 = 2304.
So, a stack error is thrown when you are declaring a big size variable locally, declare it globally and the error will disappear.
From my tests, I've discovered that you can declare a local variable with a maximum size of ~2100.

Edit: You don't need to assign that much size for just some locations and names, use 64 instead, should be more than enough
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 05-09-2021 at 13:53.
Shadows Adi is offline
 



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:39.


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