What's wrong with this cmd? -
Face9000 - 30.10.2010
Код:
IRCCMD:explode(botid, channel[], user[], host[], params[])
{
if(IRC_IsOp(botid,channel,user))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "You exploded %s",giveplayer);
SendClientMessage(playerid,COLOR_RED,string);
SetPlayerHealth(giveplayerid, 10);
new Float:boomx, Float:boomy, Float:boomz;
GetPlayerPos(giveplayerid,boomx, boomy, boomz);
CreateExplosion(boomx, boomy , boomz, 7, 10);
new msg[128];
format(msg,sizeof(msg),"0,4Admin %s has exploded %s (type 7 explosion)", nameee, giveplayer);
IRC_GroupSay(IRC_Group, EchoChan, msg);
IRC_GroupSay(IRC_Group,"PRIVATE CHAN",msg);
GetPlayerName(playerid, nameee, 30);
printf("[Command] %s has used /explode to explode %s", nameee, giveplayer);
}
else
{
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
IRC_GroupSay(IRC_Group, EchoChan, msg);
}
{
return IRC_Say(IRC_EchoConnection[0],channel,"4Invalid.");
}
return 1;
}
Re: What's wrong with this cmd? -
<Weponz> - 30.10.2010
What just code? No infomation on how its not working? Or some errors maybe?
Re: What's wrong with this cmd? -
Shubham - 30.10.2010
Give some information about the errors or what's the problem?
Re: What's wrong with this cmd? -
Face9000 - 30.10.2010
Errors:
Код:
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(1415) : error 017: undefined symbol "AntiFlood_InitPlayer"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2013) : error 017: undefined symbol "AddPlayerBan"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2015) : error 017: undefined symbol "PlaySoundForAll"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2027) : error 017: undefined symbol "PlaySoundForAdmins"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2042) : error 017: undefined symbol "AddPlayerBan"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2044) : error 017: undefined symbol "PlaySoundForAll"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2056) : error 017: undefined symbol "PlaySoundForAdmins"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2099) : error 017: undefined symbol "AddPlayerBan"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2101) : error 017: undefined symbol "PlaySoundForAll"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2116) : error 017: undefined symbol "PlaySoundForAdmins"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2133) : error 017: undefined symbol "AddPlayerBan"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2135) : error 017: undefined symbol "PlaySoundForAll"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2148) : error 017: undefined symbol "PlaySoundForAdmins"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2166) : error 017: undefined symbol "PlaySoundForAdmins"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2167) : error 017: undefined symbol "AddPlayerBan"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2169) : error 017: undefined symbol "PlaySoundForAll"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2181) : error 017: undefined symbol "PlaySoundForAdmins"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2370) : error 017: undefined symbol "AntiFlood_InitPlayer"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(2424) : error 017: undefined symbol "LoginPlayer"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(4529) : error 017: undefined symbol "CounterUAV"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(4599) : error 017: undefined symbol "AddPlayerBan"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(5151) : error 017: undefined symbol "Log"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(5161) : error 017: undefined symbol "Log"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(5273) : error 017: undefined symbol "AntiFlood_Check"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(5277) : error 017: undefined symbol "GetPName"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(5279) : error 017: undefined symbol "GetPName"
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
Re: What's wrong with this cmd? -
Scenario - 30.10.2010
This bracket is backwards.
pawn Код:
{
return IRC_Say(IRC_EchoConnection[0],channel,"4Invalid.");
Re: What's wrong with this cmd? -
Face9000 - 30.10.2010
Emh don't understand :/
Re: What's wrong with this cmd? -
Kwarde - 30.10.2010
pawn Код:
{
return IRC_Say(IRC_EchoConnection[0],channel,"4Invalid.");
must be
pawn Код:
}
return IRC_Say(IRC_EchoConnection[0],channel,"4Invalid.");
Thanks to realcop.
So this wuold be the complete code:
pawn Код:
IRCCMD:explode(botid, channel[], user[], host[], params[])
{
if(IRC_IsOp(botid,channel,user))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "You exploded %s",giveplayer);
SendClientMessage(playerid,COLOR_RED,string);
SetPlayerHealth(giveplayerid, 10);
new Float:boomx, Float:boomy, Float:boomz;
GetPlayerPos(giveplayerid,boomx, boomy, boomz);
CreateExplosion(boomx, boomy , boomz, 7, 10);
new msg[128];
format(msg,sizeof(msg),"0,4Admin %s has exploded %s (type 7 explosion)", nameee, giveplayer);
IRC_GroupSay(IRC_Group, EchoChan, msg);
IRC_GroupSay(IRC_Group,"PRIVATE CHAN",msg);
GetPlayerName(playerid, nameee, 30);
printf("[Command] %s has used /explode to explode %s", nameee, giveplayer);
}
else
{
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
IRC_GroupSay(IRC_Group, EchoChan, msg);
}
}
return IRC_Say(IRC_EchoConnection[0],channel,"4Invalid.");
}
return 1;
}
If realcop didn't say that, I wouldn't see it
Re: What's wrong with this cmd? -
Face9000 - 30.10.2010
4 errors
Код:
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(12258) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(12258) : error 017: undefined symbol "sendername"
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(12258) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Utente\Desktop\Update GM\COD5.pwn(12258) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Lol.
P.S. Thanks for help
Re: What's wrong with this cmd? -
Kwarde - 30.10.2010
"botid, channel[], user[], host[], params[]"
Indeed, there are no "playerid" and "sendername" in it.
Maybe I have a script with an example: I am not really good with IRC anymore xD
Re: What's wrong with this cmd? -
Face9000 - 31.10.2010
lol..any other?