Argument.
#1

Error:

Код:
error 035: argument type mismatch (argument 1)
Code:

Код:
CMD:setfpo(playerid, params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi mai intai.");
	//if(PinLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_BLUELIGHT, "Trebuie sa introduci codul pin mai intai folosind comanda [/pin] sau sa setezi unul folosind comanda [/setpin].");
	if(IsPlayerConnected(playerid))
 	{
        if (PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
        new id[25],cont,fp,string[182];
        if(sscanf(params, "s[25]i",id,fp)) return SendClientMessage(playerid,COLOR_WHITE, "{FF0000}Foloseste: {FFFFFF}/setfp <Nume> <FP>");
        cont = MySQLCheckAccount(id);
        if(cont == 0) return SendClientMessage(playerid,COLOR_WHITE,"{FFB870}This name does not exist.");
     	format(string, 182, "Offline AdmCmd: Admin %s i-a setat FP-ul lui %s la %d.", GetName(playerid), GetName(id), fp);  // <---- error
    	ABroadCast(COLOR_LIGHTRED,string,1);
		new str1[128];
		mysql_format(SQL,str1,sizeof(str1),"UPDATE users SET `FPunish`='%d' WHERE `name`='%s'",fp,id);
		mysql_tquery(SQL,str1,"","");
	}
	return 1;
}
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
Which line?
Код:
format(string, 182, "Offline AdmCmd: Admin %s i-a setat FP-ul lui %s la %d.", GetName(playerid), GetName(id), fp);  // <---- error
Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
Ahh, `id` should not be an array.
By the look of it id is actually a name that is searched in database and its updating something

OP: Use id direct instead of GetName(id)
Reply
#4

Quote:
Originally Posted by Banditul18
Посмотреть сообщение
By the look of it id is actually a name that is searched in database and its updating something

OP: Use id direct instead of GetName(id)
sorry,this is the line
Код:
cont = MySQLCheckAccount(id); //
Reply
#5

Well then check MySQLCheckAccount definition and see what the first argument should be. If its a string, int float etc and change it acording to function usage
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)