20.05.2013, 15:08
LINES: 3247 - 3265
"factions"/teams are defined.
Can't figure out what is causing the error.
Код:
CMD:setfaction(playerid, params[]) { new id, ammount, name[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], string[128]; if(PlayerInfo[playerid][pAdmin] > 1) return SCM(playerid, COLOR_GREY, "unauthorized"); else if(sscanf(params,"ui", id, ammount)) return SCM(sendername, COLOR_GREY, "Usage: /setfaction [playerid/PoN] [Faction ID]"); else if (ammount > 3 || ammount < 0) return SCM(sendername, COLOR_GREY, "Only factions 0-3"); else if(!IsPlayerConnected(id)) return SCM(sendername, COLOR_RED, "Player not connected or logged in"); else { GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(id, name, sizeof(name)); PlayerInfo[id][pTeam] = ammount; format(string, sizeof(string),"{006600}[AdmCmd]{FFFFFF} Admin %s added you to Faction %i.", sendername, ammount); SendClientMessage(id, COLOR_WHITE,string); format(string,sizeof(string),"You added %s to Faction %i.", name, ammount); } return 1; }
Can't figure out what is causing the error.
Код:
C:\Users\Scoot\Desktop\Roleplay\gamemodes\rp.pwn(3251) : error 035: argument type mismatch (argument 1) C:\Users\Scoot\Desktop\Roleplay\gamemodes\rp.pwn(3252) : error 035: argument type mismatch (argument 1) C:\Users\Scoot\Desktop\Roleplay\gamemodes\rp.pwn(3253) : error 035: argument type mismatch (argument 1)