01.01.2017, 14:57
That command gives me many errors and i tried to fix.
Errors:
PHP код:
IRCCMD:admins(botid, channel[], user[], host[], params[])
{
new IsOnline = 0;
new wordss[400];
foreach(Player, i)
{
if (pData[i][Admin] >= 3)
{
format(wordss, sizeof(wordss), "9,2 Admin %s (ID: %d) [Level %d]\n",GetName(i), i, pData[i][Admin]);
IsOnline++;
IRC_GroupSay(groupID, IRC_CHANNEL, wordss);
}
}
if (IsOnline == 0)
IRC_GroupSay(groupID, IRC_CHANNEL, "No admins are online!");
else
{
format(wordss, sizeof(wordss), "11,2 %d RightX Admin Online",IsOnline);
IRC_GroupSay(groupID, IRC_CHANNEL, wordss);
new msg[134],msg1[1323];
format(msg, sizeof(msg), "*Online Admins Player List Requested by %s ~ Total %d", user, IsOnline);
SendClientMessageToAll(0xFFB400FF, msg);
format(msg1, sizeof(msg1), "0,10 *Online Admins List Requested by %s ~ Total %d",user,IsOnline);
IRC_GroupSay(groupID, IRC_CHANNEL, msg1);
}
return 1;
}
Код:
D:\samp folder\RightX\gamemodes\TestG.pwn(2927) : warning 219: local variable "msg" shadows a variable at a preceding level D:\samp folder\RightX\gamemodes\TestG.pwn(4034) : error 001: expected token: "-string end-", but found "-identifier-" D:\samp folder\RightX\gamemodes\TestG.pwn(4034) : error 001: expected token: ";", but found "[" D:\samp folder\RightX\gamemodes\TestG.pwn(4039) : error 010: invalid function or declaration D:\samp folder\RightX\gamemodes\TestG.pwn(4041) : error 010: invalid function or declaration D:\samp folder\RightX\gamemodes\TestG.pwn(4048) : error 010: invalid function or declaration D:\samp folder\RightX\gamemodes\TestG.pwn(4050) : error 010: invalid function or declaration D:\samp folder\RightX\gamemodes\TestG.pwn(4055) : error 021: symbol already defined: "format" D:\samp folder\RightX\gamemodes\TestG.pwn(4060) : error 010: invalid function or declaration D:\samp folder\RightX\gamemodes\TestG.pwn(4068) : warning 203: symbol is never used: "IsOnline" D:\samp folder\RightX\gamemodes\TestG.pwn(4068) : warning 203: symbol is never used: "msg" D:\samp folder\RightX\gamemodes\TestG.pwn(4068) : warning 203: symbol is never used: "msg1" D:\samp folder\RightX\gamemodes\TestG.pwn(4068) : warning 203: symbol is never used: "wordss" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.