Raised This Month: $ Target: $400
 0% 

Solved stack error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
lexzor
Veteran Member
Join Date: Nov 2020
Old 05-09-2021 , 12:17   stack error
Reply With Quote #1

hello. i Have this code:

PHP Code:
#define MAX_SKINS 9

enum _:TERO
{
    
szTModelName[256],
    
szTModelLocation[256],
    
szTModelPreview[256],
    
iTVIPOnly
}

if (
iFile)
    {
        new 
szData[256]
        new 
iSection
        
new szTempName[MAX_SKINS][256]
        new 
szTempLocation[MAX_SKINS][256]
        new 
szTempPreview[MAX_SKINS][256]
        new 
szTempVIP[MAX_SKINS][1]  
        new 
0

        iFilePointer 
fopen(g_szFile"rt")
        
        while(!
feof(iFilePointer))
        {
            
fgets(iFilePointerszDatacharsmax(szData))
            
trim(szData)
            
            if(
szData[0] == '#' || szData[0] == EOS || szData[0] == ';')
                continue
                
            if(
szData[0] == '[')
            {
                
iSection += 1
            
}
            
            switch(
iSection)
            {
                
                case 
TERO:
                {
                    if(
szData[0] != '[')
                    {
                        ++
i
                        
                        parse
(szDataszTempName[i-1], charsmax(szTempName[]), szTempLocation[i-1], charsmax(szTempLocation[]), szTempPreview[i-1], charsmax(szTempPreview[]), szTempVIP[i-1], charsmax(szTempVIP[]))
                        
formatex(g_TSkin[i-1][szTModelName], charsmax(g_TSkin[][szTModelName]),  szTempName[i-1])

                        
formatex(g_TSkin[i-1][szTModelLocation], charsmax(g_TSkin[][szTModelLocation]),  szTempLocation[i-1])

                        
formatex(g_TSkin[i-1][szTModelPreview], charsmax(g_TSkin[][szTModelPreview]),  szTempPreview[i-1])

                        
g_TSkin[i-1][iTVIPOnly] = str_to_num(szTempVIP[i-1])

                        
server_print("%s %s"g_TSkin[i-1][szTModelName], g_TSkin[i-1][szTModelLocation])
                        
server_print("%s %i"g_TSkin[i-1][szTModelPreview], g_TSkin[i-1][iTVIPOnly])
                    }
                }

and this is the error:
Code:
L 05/09/2021 - 19:12:31: [AMXX] Displaying debug trace (plugin "ceva.amxx", version "unknown")
L 05/09/2021 - 19:12:31: [AMXX] Run time error 3: stack error 
L 05/09/2021 - 19:12:31: [AMXX]    [0] ceva.sma::plugin_precache (line 273)
line 273:
PHP Code:
new szTempName[MAX_SKINS][256
i tried to change variable size but wasn t enough..

some ideas ? I m doing same thing in same way in another plugin and it s working

Last edited by lexzor; 05-09-2021 at 14:18.
lexzor is offline
 


Thread Tools
Display Modes

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