zcmd error :| - 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: zcmd error :| (
/showthread.php?tid=181026)
zcmd error :| -
eXtr1kE - 03.10.2010
Код:
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(10996) : warning 217: loose indentation
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11002) : warning 217: loose indentation
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11005) : error 017: undefined symbol "sendername"
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11005) : error 017: undefined symbol "sendername"
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11005) : error 029: invalid expression, assumed zero
C:\SAMP0~1.3BR\GAMEMO~1\gf.pwn(11005) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
pawn Код:
CMD:ooc(playerid, params[])
{
if(IsPlayerConnected(playerid)) {
new string[256],result,sendername[MAX_PLAYER_NAME];
if (sscanf(params, "s", result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]"); return 1; }
if(FindIP(params)) /// Anti-Reclama {
format(string, sizeof(string), "AdmCmd: %s was kicked by Guardian, reason: Server Advertise",sendername);
SendClientMessageToAll(0xFF6347FF,string);
PlayerInfo[playerid][pWarns] += 1;
KickLog(string);
Kick(playerid);
return 1;
}
if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !"); return 1; }
if ((noooc) && PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_GRAD2, " The OOC channel has been disabled by an Admin !"); return 1; }
if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "(( %s: %s ))", sendername, result);
OOCOff(COLOR_OOC,string);
printf("%s", string);
}
return 1;
}
wtf?
Re: zcmd error :| -
Hal - 03.10.2010
to make it easier to read, put your code in [pawn] BBC code.
Re: zcmd error :| -
eXtr1kE - 03.10.2010
Done.....
Re: zcmd error :| -
LarzI - 03.10.2010
pawn Код:
CMD:ooc(playerid, params[])
{
new
result[128],
sendername[MAX_PLAYER_NAME];
if (sscanf(params, "s", result))
return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]");
if(FindIP(params)) /// Anti-Reclama
{
format(string, sizeof(string), "AdmCmd: %s was kicked by Guardian, reason: Server Advertise",sendername);
SendClientMessageToAll(0xFF6347FF,string);
PlayerInfo[playerid][pWarns] += 1;
KickLog(string);
Kick(playerid);
return true;
}
if(gPlayerLogged[playerid] == 0)
return SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
return SendClientMessage(playerid, COLOR_GRAD2, " The OOC channel has been disabled by an Admin !");
if(PlayerInfo[playerid][pMuted] == 1)
return SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(result, sizeof(result), "(( %s: %s ))", sendername, result);
OOCOff(COLOR_OOC,string);
printf("%s", string);
return 1;
}