13.05.2010, 22:24
Okay so this is what I have:
But when I compile this, I get
On this line: SetPlayerScore(scoreid, tmp);
Код:
CMD:setscore(playerid, params[]) { if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "Usage: /setscore [playerid] [score]"); if(PlayerInfo[playerid][Admin] >= 4) { new tmp[256], idx; tmp = strtok(params,idx); if(!strlen(tmp)) { SendClientMessage(playerid,0x0000FFFF,"Usage: /setscore [playerid] [score]"); return 1; } new scoreid = strval(tmp); if(!IsPlayerConnected(scoreid)) { SendClientMessage(playerid,COLOR_RED,"Invalid PlayerID"); return 1; } tmp = strrest(params,idx); new pname[MAX_PLAYER_NAME], pname2[MAX_PLAYER_NAME], string[128]; GetPlayerName(scoreid, pname, sizeof(pname)); GetPlayerName(playerid, pname2, sizeof(pname2)); tmp = strrest(params, idx); format(string, sizeof(string), "%s has set your score to %s", pname2, tmp); SendClientMessage(scoreid,COLOR_RED, string); SetPlayerScore(scoreid, 0); SetPlayerScore(scoreid, tmp); //Error on this line return 1; } else return SendClientMessage(playerid,COLOR_RED,"You aren't a level 4 admin."); }
Quote:
error 035: argument type mismatch (argument 2) |