22.04.2017, 15:26
(
Last edited by asafasaf; 22/04/2017 at 04:25 PM.
)
this is the error:
error 035: argument type mismatch (argument 1)
the command:
thank you and sorry about my bad english
error 035: argument type mismatch (argument 1)
the command:
PHP Code:
if(!strcmp(cmd, "/ClanColor", true)) {
format(ClanFile, sizeof(ClanFile), "Players/Clans/%d.txt",CNameByID(DOF2_GetString(PClanFile(playerid),"Clan")));
if(DOF2_GetInt(PClanFile(playerid),"InClan") == 0) return SendClientMessage(playerid,COLOR_RED, ".аъд ма роца бчмап");
if(DOF2_GetInt(PClanFile(playerid),"ClanLevel") < 5) return SendClientMessage(playerid,COLOR_RED, ".щйрей цбт мчмап жойп шч моййсг дчмап");
tmp = strtok(cmdtext, idx);
tmp1 = strtok(cmdtext, idx);
cmd = strtok(cmdtext, idx);
new ClanColorR, ClanColorG, ClanColorB;
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "/Clan Color [R] [G] [B] :цешъ щйоещ");
if(!strlen(tmp1)) return SendClientMessage(playerid, COLOR_WHITE, "/Clan Color [R] [G] [B] :цешъ щйоещ");
if(!strlen(cmd)) return SendClientMessage(playerid, COLOR_WHITE, "/Clan Color [R] [G] [B] :цешъ щйоещ");
ClanColorR = strval(tmp);
ClanColorG = strval(tmp1);
ClanColorB = strval(cmd);
format(ClanFile, sizeof (ClanFile), "Players/Clans/%s.ini", DOF2_GetInt(PClanFile(playerid), "Clan"));
DOF2_SetInt(ClanFile,"ClanColorR",ClanColorR);
DOF2_SetInt(ClanFile,"ClanColorG",ClanColorG);
DOF2_SetInt(ClanFile,"ClanColorB",ClanColorB);
SendClientMessage(playerid, rgba2hex(ClanColorR,ClanColorG,ClanColorB,0), ".цбт дчмап щерд мцбт дегтд же");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!strcmp(DOF2_GetInt(PClanFile(playerid), "Clan"), DOF2_GetInt(PClanFile(i), "Clan"), true)) // the error is in this line
{
SetPlayerColor(i, rgba2hex(ClanColorR,ClanColorG,ClanColorB,0));
}
}
return 1;
}