number of arg. does not match definition
#1

Getting this error on this CMD:

pawn Код:
CMD:garagename(playerid, params[])
{
    new id = GetClosestGarage(playerid);

    if(id == -1) return SCM(playerid, COLOR_ERROR, "» There are no garages near you.");

    //if(GarageData[id][garageOwnerID] != playerid) return SCM(playerid, COLOR_ERROR, "» This garage not yours."); //To fix

    if(!GarageData[id][garageOwned]) return SCM(playerid, COLOR_ERROR, "» This garage is unowned.");

    new name;

    if(name < 4 || name > MAX_GARAGE_NAME) return SCM(playerid, COLOR_ERROR, "» Name should be between 4 and 40 chars.");

    format(GarageData[id][garageName], MAX_GARAGE_NAME, name);
   
    new Query[150];
    format(Query,sizeof(Query), "UPDATE garages SET garageName = '%e' WHERE ID = '%d'", name, id);
    db_query(GarageDB, Query);

    UpdateGarageLabel(id);

    SCM(playerid, COLOR_YELLOW, "» [GARAGE] You have changed your garage name successfully!");
    SCMEX(playerid, COLOR_YELLOW, "» [GARAGE] New name: %s", name);

    GameTextForPlayer(playerid, "~w~Garage ~g~name changed~w~!", 3000, 3);
    return 1;
}
Error line:

pawn Код:
format(GarageData[id][garageName], MAX_GARAGE_NAME, name);
#define MAX_GARAGE_NAME 40
Reply


Messages In This Thread
number of arg. does not match definition - by SymonClash - 27.02.2019, 10:54
Re: number of arg. does not match definition - by NaS - 27.02.2019, 11:28
Re: number of arg. does not match definition - by TheToretto - 27.02.2019, 11:40
Re: number of arg. does not match definition - by SymonClash - 27.02.2019, 12:52
Re: number of arg. does not match definition - by Kaliber - 27.02.2019, 12:57
Re: number of arg. does not match definition - by SymonClash - 27.02.2019, 13:13

Forum Jump:


Users browsing this thread: 2 Guest(s)