PDA

View Full Version : I`m getting a strange error, please help me


asafasaf
22/04/2017, 03:26 PM
this is the error:
error 035: argument type mismatch (argument 1)
the command:

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;
}

thank you and sorry about my bad english

Ertouq
22/04/2017, 03:39 PM
Please put [ php ] (no space) at the beginning of the text, and [ /php ] (no space) at the end of the text so that it can read well :)

asafasaf
22/04/2017, 04:27 PM
Please put [ php ] (no space) at the beginning of the text, and [ /php ] (no space) at the end of the text so that it can read well :)
done.
can you help me please?

khRamin78
22/04/2017, 04:32 PM
format(ClanFile, sizeof(ClanFile), "Players/Clans/%d.txt",CNameByID(DOF2_GetString(PClanFile(playerid),"Clan")));

format(ClanFile, sizeof (ClanFile), "Players/Clans/%s.ini", DOF2_GetInt(PClanFile(playerid), "Clan"));

can u tell me what are these ? u cant define 2x strings in one string what is "clan" part ?

asafasaf
22/04/2017, 04:39 PM
format(ClanFile, sizeof(ClanFile), "Players/Clans/%d.txt",CNameByID(DOF2_GetString(PClanFile(playerid),"Clan")));

format(ClanFile, sizeof (ClanFile), "Players/Clans/%s.ini", DOF2_GetInt(PClanFile(playerid), "Clan"));

can u tell me what are these ? u cant define 2x strings in one string what is "clan" part ?
"Clans" is a part in %s.ini

asafasaf
22/04/2017, 05:08 PM
UP
Please help me...
i`m really want to compile the mode...

asafasaf
23/04/2017, 02:39 PM
UP...

Toroi
23/04/2017, 02:50 PM
If they are integer values you don't need to use strcmp

if(DOF2_GetInt(PClanFile(playerid), "Clan") == DOF2_GetInt(PClanFile(i), "Clan"))