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

Solved Compiler Internal Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-31-2019 , 12:45   Compiler Internal Error
Reply With Quote #1

I have this ~4K lines plugin, and I was getting internal error when trying to compile, so I tried commenting parts to find out which was causing the error, turns it out it's this:

PHP Code:
public OnGagPlayerReasonid )
{
    new 
szReason32 ];
    
read_argsszReasoncharsmaxszReason ) );
    
    
remove_quotesszReason );
    
trimszReason );
    
    new 
iPlayer g_iGagid ][ GAG_ID ];
    
    new 
iImmunityLevel GetImmunityLevelid );
    new 
iImmunityLevelTarget GetImmunityLeveliPlayer );
    
    if( 
iImmunityLevel iImmunityLevelTarget )
    {
        
CC_SendMessageid"&x04%s &x03%L"g_iConfigSystem_Prefix ], id"CANT_PERFORM_IMMUNITY" );
        
arraysetg_iGagid ], 0sizeofg_iGag[ ] ) );
        
        return 
PLUGIN_HANDLED;
    }
    
    new 
szFlags];
    
copyszFlagscharsmaxszFlags ), g_iGagid ][ GAG_FLAGS ];
    
    new 
szDate32 ], szNameAdmin32 ], szNameUser32 ], szSteamIdUser32 ], szIpUser24 ], szExpireDate32 ], iSeconds g_iGagiPlayer ][ GAG_SECONDS ];
    
get_time"%m/%d/%Y - %H:%M:%S"szDatecharsmaxszDate ) );
    
    
get_user_nameidszNameAdmincharsmaxszNameAdmin ) );
    
get_user_nameiPlayerszNameUsercharsmaxszNameUser ) );
    
get_user_authidiPlayerszSteamIdUsercharsmaxszSteamIdUser ) );
    
get_user_ipiPlayerszIpUsercharsmaxszIpUser ), );
    
    if( 
iSeconds == )
    {
        
CC_SendMessage0"&x04%s %L"g_iConfigSystem_Prefix ], LANG_PLAYER"GAGGED_PERMANENT"szNameAdminszNameUserszFlagsszReason );
        
log_to_fileg_iConfigLogs_File ], "(%s) %L"szDateLANG_PLAYER"LOG_GAGGED_PERMANENT"szNameAdminszNameUserszSteamIdUserszIpUserszReason );
        
        
copyszExpireDatecharsmaxszExpireDate ), "never" );
    }
    
    else
    {
        
AddSecondsToDateszDateiSecondsszExpireDatecharsmaxszExpireDate ) );
        
        if( 
iSeconds == )
        {
            
CC_SendMessage0"&x04%s %L"g_iConfigSystem_Prefix ], LANG_PLAYER"GAGGED_SINGULAR"szNameAdminszNameUserszReasonszFlags );
            
log_to_fileg_iConfigLogs_File ], "(%s) %L"szDateLANG_PLAYER"LOG_GAGGED_SINGULAR"szNameAdminszNameUserszSteamIdUserszIpUserszReasonszExpireDate );
        }
        
        else
        {
            
CC_SendMessage0"&x04%s %L"g_iConfigSystem_Prefix ], LANG_PLAYER"GAGGED_PLURAL"szNameAdminszNameUseriSecondsszReasonszFlags );
            
log_to_fileg_iConfigLogs_File ], "(%s) %L"szDateLANG_PLAYER"LOG_GAGGED_PLURAL"szNameAdminszNameUserszSteamIdUserszIpUseriSecondsszReasonszExpireDate );
        }
    }
    
    
trimszNameUser );
    
trimszSteamIdUser );
    
trimszIpUser );
    
trimszExpireDate );
    
trimszReason );
    
trimszNameAdmin );
    
    new 
eDataPlayerGag ];    
    
copyeDataPlayer_Name ], charsmaxeDataPlayer_Name ] ), szNameUser );
    
copyeDataPlayer_SteamId ], charsmaxeDataPlayer_SteamId ] ), szSteamIdUser );
    
copyeDataPlayer_IP ], charsmaxeDataPlayer_IP ] ), szIpUser );
    
copyeDataPlayer_GagExpire ], charsmaxeDataPlayer_GagExpire ] ), szExpireDate );
    
copyeDataPlayer_GagReason ], charsmaxeDataPlayer_GagReason ] ), szReason );
    
copyeDataPlayer_GagFlags ], charsmaxeDataPlayer_GagFlags ] ), szFlags );
    
    
ArrayPushArrayg_aBanseData );
    
    if( 
szFlags"v" ) != -&& is_user_connectedid ) )
    {
        
set_speakiPlayerSPEAK_MUTED );
    }
    
    
GagPlayerszNameUserszSteamIdUserszIpUserszReasonszFlagsszExpireDate );
    
set_task1.0"TaskCheckGagExpire"id TASK_GAG_CHECK, .flags="b" );
    
    
arraysetg_iGagid ], 0sizeofg_iGag[ ] ) );
    
    
set_task0.1"ReOpenGagMenu"id TASK_GAG_MENU );
    
    return 
PLUGIN_HANDLED;

When I comment new szReason[ 32 ]; it just shows normal errors, since the variable is not created, but when I uncomment it, it shows internal error.
Anyone has any idea what might be the cause of this error? I remember I've seen this error long ago, but I have no idea how I managed to fix it.
__________________

Last edited by edon1337; 07-31-2019 at 14:19.
edon1337 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-31-2019 , 14:04   Re: Compiler Internal Error
Reply With Quote #2

PHP Code:
     
    
new szFlags]; 
    
copyszFlagscharsmaxszFlags ), g_iGagid ][ GAG_FLAGS ]; 

PHP Code:
     
    
new szFlags]; 
    
copyszFlagscharsmaxszFlags ), g_iGagid ][ GAG_FLAGS ] ) ; // you forgot to close 
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-31-2019 , 14:14   Re: Compiler Internal Error
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
PHP Code:
     
    
new szFlags]; 
    
copyszFlagscharsmaxszFlags ), g_iGagid ][ GAG_FLAGS ]; 

PHP Code:
     
    
new szFlags]; 
    
copyszFlagscharsmaxszFlags ), g_iGagid ][ GAG_FLAGS ] ) ; // you forgot to close 
Thanks, I just figured it out myself and then saw your post (not trying to be disgraceful to your comment). I still get internal error, I'm gonna keep looking for mistakes, apparently you get internal error when you have a lot of mistakes in your code.
__________________

Last edited by edon1337; 07-31-2019 at 14:15.
edon1337 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-31-2019 , 14:17   Re: Compiler Internal Error
Reply With Quote #4

Fixed.

Natsheh's post + this

Code:

    if( szFlags, "v" ) != -1 && is_user_connected( id ) ) 
    { 
        set_speak( iPlayer, SPEAK_MUTED ); 
    }
-->
Code:
	if( equali( szFlags, "v" ) != -1 && is_user_connected( id ) )
	{
		set_speak( iPlayer, SPEAK_MUTED );
	}
I'm interested in knowing why only 2 mistakes would cause such confusing error?
__________________

Last edited by edon1337; 07-31-2019 at 14:18.
edon1337 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-31-2019 , 22:03   Re: Compiler Internal Error
Reply With Quote #5

I don't know why it happens, may be due the number of lines that you write, but if you make a mistake, the compiler prints errors on lines that doesn't make sense at all, you need to read line-per-line until you see what you've made wrong... it sucks.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Reply


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 14:11.


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