14.05.2012, 17:04
Hello.. I was doing a cmd which the trainer could give a fight style to another player.. it gives me that error:
And here's the code:
Код:
error 035: argument type mismatch (argument 1)
Код:
if(strcmp(cmd, "/trainboxing", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pJob2] != 2) { SendClientMessage(playerid, COLOR_GREY, "You are not a Fight instructor!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /Trainboxing [playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, sendername, sizeof(sendername)); SetPlayerFightingStyle (giveplayer, FIGHT_STYLE_BOXING); format(string, sizeof(string),"You have given a Fight style to %s.",giveplayer); SendClientMessage(playerid, COLOR_GREY, string); format(string, sizeof(string),"You are given a Fight style."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string),"[ADMIN]: %s has given a Fight style to %s.",sendername, giveplayer); SendAdminMessage(COLOR_LIGHTRED, string); format(string, sizeof(string),"[ADMIN]: %s has given a Fight style to %s.",sendername, giveplayer); SendTesterMessage(COLOR_LIGHTRED, string); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /trainboxing %s",d,m,y,h,mi,s,giveplayer, sendername); AdminLog(string); } } else { SendClientMessage(playerid, COLOR_GREY, " That player is Offline !"); return 1; } } return 1; }