Thread: [Solved] stack error
View Single Post
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