/rp command problem (sscanf) (rp = report ciminality - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /rp command problem (sscanf) (rp = report ciminality (
/showthread.php?tid=87826)
/rp command problem (sscanf) (rp = report ciminality -
Pawno_Master - 22.07.2009
Hello
i have a problem with /rp command i am using sscanf
Код:
C:\Gta Sa Server Vernieuwd\gamemodes\freeroam.pwn(2082) : warning 217: loose indentation
C:\Gta Sa Server Vernieuwd\gamemodes\freeroam.pwn(2082) : error 017: undefined symbol "reason"
C:\Gta Sa Server Vernieuwd\gamemodes\freeroam.pwn(2082) : warning 215: expression has no effect
C:\Gta Sa Server Vernieuwd\gamemodes\freeroam.pwn(2082) : error 001: expected token: ";", but found "]"
C:\Gta Sa Server Vernieuwd\gamemodes\freeroam.pwn(2082) : error 029: invalid expression, assumed zero
C:\Gta Sa Server Vernieuwd\gamemodes\freeroam.pwn(2082) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
these are my errors
Код:
[ dcmd_rp(playerid, params[])
{
new
id;
reason[64];
if (sscanf(params, "uz", id, reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ban <playerid/partname> <reason (optional)>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else if (GetDistanceBetweenPlayers(playerid,id) > 5) SendClientMessage(playerid,donkerrood,"The player is too far away");
else if (gTeam[playerid] != TEAM_COPS) { SendClientMessage(playerid,donkerrood,"You aren't a Cop"); }
else if (gTeam[id] == TEAM_COPS) { SendClientMessage(playerid,donkerrood,"You cant report criminality over a cop"); }
else if (GetPlayerWantedLevel(id) > 0) { SendClientMessage(playerid,donkerrood,"Player is already wanted"); }
else if (gTeam[playerid] == TEAM_COPS)
{
format(reason, sizeof (reason), "You have been banned%s%s.", reason[0] ? (" because: ") : (""), reason);
SendClientMessage(id, donkerrood, reason);
SendClientMessage(playerid, 0x00FF00AA, "Player reported");
SetPlayerWantedLevel(id,2);
}
return 1;
}/code]
thar's my cmd
Код:
if (sscanf(params, "uz", id, reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ban <playerid/partname> <reason (optional)>\"");
thats's line of errors
help plz!!!1
Re: /rp command problem (sscanf) (rp = report ciminality -
arnutisz - 22.07.2009
Should be:
Re: /rp command problem (sscanf) (rp = report ciminality -
yezizhu - 22.07.2009
new
id;
reason[64];
to
new
id,
reason[64];
Edit:I'm late lol
Re: /rp command problem (sscanf) (rp = report ciminality -
Pawno_Master - 22.07.2009
ok
only have one prublem
it only says
you have been banned
but without the reason and everything:S
how could i think this
Re: /rp command problem (sscanf) (rp = report ciminality -
yezizhu - 22.07.2009
Try
Код:
sscanf(params,"us",.....
?