PAWNO error 035 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: PAWNO error 035 (
/showthread.php?tid=438487)
PAWNO error 035 -
Gecko75 - 20.05.2013
LINES: 3247 - 3265
Код:
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;
}
"factions"/teams are defined.
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)
Re: PAWNO error 035 -
Avi Raj - 20.05.2013
All errors are in it :- ammount
You should add an enum for it, not a define.
Re: PAWNO error 035 -
Dragonsaurus - 20.05.2013
All errors are at the SCM. You should put "playerid" instead on "sendername":
pawn Код:
if(sscanf(params, "iu", id, ammount)) return SCM(playerid, COLOR_GREY, "Usage: /setfaction [playerid/PoN] [Faction ID]");
else if (ammount > 3 || ammount < 0) return SCM(playerid, COLOR_GREY, "Only factions 0-3");
else if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_RED, "Player not connected or logged in");