HELP (ERROR 035)
#1

Код:
error 035: argument type mismatch (argument 1)
In 4 Lines!
PHP код:
CMD:fperk(playeridparams[]) {
    if(
PlayerInfo[playerid][pIFactionModerator] == || PlayerInfo[playerid][pAdmin] == 6) {
        new 
familyperkstring[128];
        if(
sscanf(params"is[64]"familyperk))
        {
            
SendUsageMessage(playerid" /fperk [Faction Number] [Perk]");
            
SendClientMessage(playeridCOLOR_GREY"Available names: Drugs, Guns, CarJacking, None.");
            return 
1;
        }
        if(
family || family MAX_FAMILY) { SendErrorMessage(playerid"Faction number can't be below 1 or above 14!"); return 1; }
        
family -= 1;
        if(
strcmp(perk,"drugs",true) == 0// ERROR LINE 1
        
{
            
SendClientMessage(playeridCOLOR_TWTAN"You have set a drug smuggling perk to that faction.");
            
FamilyInfo[family][FamilyPerk] = 1;
            
SaveFamilies();
        }
        else if(
strcmp(perk,"guns",true) == 0// ERROR LINE 2
        
{
              
SendClientMessage(playeridCOLOR_TWTAN"You have set a gun smuggling perk to that faction.");
            
FamilyInfo[family][FamilyPerk] = 2;
            
SaveFamilies();
        }
        else if(
strcmp(perk,"carjacking",true) == 0// ERROR LINE 3
        
{
              
SendClientMessage(playeridCOLOR_TWTAN"You have set a car jacking perk to that faction.");
            
FamilyInfo[family][FamilyPerk] = 3;
            
SaveFamilies();
        }
        else if(
strcmp(perk,"none",true) == 0// ERROR LINE 4
        
{
              
SendClientMessage(playeridCOLOR_TWTAN"You have set a gun smuggling perk to that faction.");
            
FamilyInfo[family][FamilyPerk] = 0;
            
SaveFamilies();
        }
    }
    else
    {
        
SendErrorMessage(playerid"You're not an admin or a illegal faction moderator!");
        return 
1;
    }
    return 
1;

Reply
#2

It says that you used different type instead of that required one
EX: U used bool instead of string
Reply
#3

strcmp requires two strings. The variable "perk" should also be a string.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)