number of arg. does not match definition
#5

Here you go:

PHP код:
CMD:garagename(playeridparams[])
{
    new 
id GetClosestGarage(playerid);
    if(
id == -1) return SCM(playeridCOLOR_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(playeridCOLOR_ERROR"» This garage is unowned.");
    new 
len strlen(params);
    if(
len || len MAX_GARAGE_NAME) return SCM(playeridCOLOR_ERROR"» Name should be between 4 and 40 chars.");
    
format(GarageData[id][garageName], MAX_GARAGE_NAMEparams);
    
    new 
Query[150];
    
format(Query,sizeof(Query), "UPDATE garages SET garageName = '%e' WHERE ID = '%d'"paramsid);
    
db_query(GarageDBQuery);
    
UpdateGarageLabel(id);
    
SCM(playeridCOLOR_YELLOW"» [GARAGE] You have changed your garage name successfully!");
    
SCMEX(playeridCOLOR_YELLOW"» [GARAGE] New name: %s"params);
    
GameTextForPlayer(playerid"~w~Garage ~g~name changed~w~!"30003);
    return 
1;

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: 1 Guest(s)