01.05.2012, 00:58
(
Последний раз редактировалось logoster; 01.05.2012 в 01:00.
Причина: needed fizing
)
it compiles with 2 errors which are causing me to get unkown cmd in-game
and my code:
Код:
W:\Users\Mom & Dad\Documents\samp03dsvr_R2_win32\gamemodes\lvcnr.pwn(349) : warning 225: unreachable code W:\Users\Mom & Dad\Documents\samp03dsvr_R2_win32\gamemodes\lvcnr.pwn(352) : warning 219: local variable "str" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.
pawn Код:
if (strcmp("/me", cmdtext, true, 3))
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessageToAll(COLOR_WHITE, str);
IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
IRC_GroupSay(gGroupID, ADMIN_IRC_CHANNEL, str);
return 1;
}
if (strcmp("/irc", cmdtext, true, 3) == 0)
{
if (!cmdtext[3])return SendClientMessage(playerid, COLOR_RED, "USAGE: /irc (message)");
new ircmsg[128];
format(ircmsg, sizeof(ircmsg), "02To IRC: %s(%d) said:%s", ircmsg,GetName(playerid), playerid, cmdtext[4]);
IRC_GroupSay(gGroupID, IRC_CHANNEL, ircmsg);
IRC_GroupSay(gGroupID, ADMIN_IRC_CHANNEL, ircmsg);
SendClientMessage(playerid, COLOR_YELLOW, "Message Sent To Irc");
return 1;
}