View Single Post
einsfuhrer
Member
Join Date: Jun 2019
Old 07-10-2019 , 13:01   Re: [HELP] ERROR: function prototypes do not match
Reply With Quote #3

Quote:
Originally Posted by Whai View Post
From console.inc :

PHP Code:
/**
 * Called when a generic console command is invoked.
 *
 * @param client        Index of the client, or 0 from the server.
 * @param args            Number of arguments that were in the argument string.
 * @return                An Action value.  Not handling the command
 *                        means that Source will report it as "not found."
 */
typedef ConCmd = function Action (int clientint args); 
so your
PHP Code:
public Action Command_hidetag(const char[] sCommandint iClientint sArgs
does not match.
It fixed that problem but made another one:

Code:
(393) : error 017: undefined symbol "sCommand"
Part of code:
PHP Code:
public Action Command_hidetag(int iClientint sArgs)
{
    if (
StrEqual(sCommand"say"))
    {
        
int iTeam GetClientTeam(iClient);
        
        if (
iTeam 0)
        {
            if (
IsClientInGame(iClient))
            {
                if(
IsPlayerAlive(iClient)) 
                {   
                    if (
CheckCommandAccess(iClient"chattag"ADMFLAG_ROOT))
                    {
                        if (
GetClientTeam(iClient) == 3)
                            
PrintToChatAll(" \x0AHIDEROLE \x01| \x0B%N \x08» \x01%s"iClientsArgs);
                                
                        if (
GetClientTeam(iClient) == 2)
                            
PrintToChatAll(" \x0AHIDEROLE \x01| \x09%N \x08» \x01%s"iClientsArgs);

                        else if (
GetClientTeam(iClient) == 1)
                            
PrintToChatAll(" \x0AHIDEROLE \x01| \x03%N \x08» \x01%s"iClientsArgs);
                    }
                    else if (
CheckCommandAccess(iClient"chattag"ADMFLAG_RCON))
                    {
                        if (
GetClientTeam(iClient) == 3)
                            
PrintToChatAll(" \x04MANAGER \x01| \x0B%N \x08» \x01%s"iClientsArgs);
                                
                        if (
GetClientTeam(iClient) == 2)
                            
PrintToChatAll(" \x04MANAGER \x01| \x09%N \x08» \x01%s"iClientsArgs);

                        else if (
GetClientTeam(iClient) == 1)
                            
PrintToChatAll(" \x04MANAGER \x01| \x03%N \x08» \x01%s"iClientsArgs);
                    }
                    else
                    {
                        if (
GetClientTeam(iClient) == 3)
                            
PrintToChatAll(" \x08\x01\x0B%N \x08» \x01%s"iClientsArgs);
                                
                        if (
GetClientTeam(iClient) == 2)
                            
PrintToChatAll(" \x08\x01\x09%N \x08» \x01%s"iClientsArgs);

                        else if (
GetClientTeam(iClient) == 1)
                            
PrintToChatAll(" \x08\x01\x03%N \x08» \x01%s"iClientsArgs);
                    }
                }
                else
                {
                    if (
CheckCommandAccess(iClient"chattag"ADMFLAG_ROOT))
                {
                    if (
GetClientTeam(iClient) == 3)
                        
PrintToChatAll(" \x0FDEAD \x01| \x0AHIDEROLE \x01| \x0B%N \x08» \x01%s"iClientsArgs);
                            
                    if (
GetClientTeam(iClient) == 2)
                        
PrintToChatAll(" \x0FDEAD \x01|  \x0AHIDEROLE \x01| \x09%N \x08» \x01%s"iClientsArgs);

                    else if (
GetClientTeam(iClient) == 1)
                        
PrintToChatAll(" \x0FDEAD \x01|  \x0AHIDEROLE \x01| \x03%N \x08» \x01%s"iClientsArgs);
                }
                else if (
CheckCommandAccess(iClient"chattag"ADMFLAG_RCON))
                {
                    if (
GetClientTeam(iClient) == 3)
                        
PrintToChatAll(" \x0FDEAD \x01|  \x04MANAGER \x01| \x0B%N \x08» \x01%s"iClientsArgs);
                            
                    if (
GetClientTeam(iClient) == 2)
                        
PrintToChatAll(" \x0FDEAD \x01|  \x04MANAGER \x01| \x09%N \x08» \x01%s"iClientsArgs);

                    else if (
GetClientTeam(iClient) == 1)
                        
PrintToChatAll(" \x0FDEAD \x01|  \x04MANAGER \x01| \x03%N \x08» \x01%s"iClientsArgs);
                }
                else
                {
                    if (
GetClientTeam(iClient) == 3)
                        
PrintToChatAll(" \x0FDEAD \x01|  \x08\x01\x0B%N \x08» \x01%s"iClientsArgs);
                            
                    if (
GetClientTeam(iClient) == 2)
                        
PrintToChatAll(" \x0FDEAD \x01|  \x08\x01\x09%N \x08» \x01%s"iClientsArgs);

                    else if (
GetClientTeam(iClient) == 1)
                        
PrintToChatAll(" \x0FDEAD \x01|  \x08\x01\x03%N \x08» \x01%s"iClientsArgs);
                }
                }
            }
        }
    }

This is another function in the code that works, there is sCommand in the function parentheses but when I put sCommand in the RegAdminCmd it will give the recent error:

PHP Code:
public Action OnClientSayCommand(int iClient, const char[] sCommand, const char[] sArgs)
{
    
int iTimeiYeariMonthiDayiHouriMinuteiSecond;
    
    
iTime GetTime();
    
    
UnixToTime(iTimeiYeariMonthiDayiHouriMinuteiSecondiTimezone);
    
    if (
StrEqual(sCommand"say"))
    {
        
int iTeam GetClientTeam(iClient);
        
        if (
iTeam 0)
        {
            if (
IsClientInGame(iClient))
            { 
What should I do to get the sCommand to get defined?

Last edited by einsfuhrer; 07-10-2019 at 13:02.
einsfuhrer is offline