error 035: argument type mismatch (argument 1)
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; }
format(string, 182, "Offline AdmCmd: Admin %s i-a setat FP-ul lui %s la %d.", GetName(playerid), GetName(id), fp); // <---- error
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) |
cont = MySQLCheckAccount(id); //