help me with this please. -
Gangster-rocks - 14.07.2012
Код:
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(412) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(415) : error 029: invalid expression, assumed zero
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(415) : warning 215: expression has no effect
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(415) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(426) : error 001: expected token: ";", but found "new"
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(430) : error 017: undefined symbol "KcikMessage"
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(430) : error 035: argument type mismatch (argument 1)
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(426) : warning 204: symbol is assigned a value that is never used: "KickMessage"
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : warning 225: unreachable code
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : warning 217: loose indentation
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : error 029: invalid expression, assumed zero
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : error 017: undefined symbol "cmd_givecash"
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : error 029: invalid expression, assumed zero
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
10 Errors.
pawn Код:
CMD:kick(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
new id;
new str[128]
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You may not use this command");
if(sscanf(params,"us",id,str)) return SendClientMessage(playerid,-1,"{000000}You may not use this command");
{
else if(id == playerid) {
return SendClientMessage(playerid,COLOR_RED,"You can kick your self");
}
else if(IsPlayerAdmin(id)) {
return SendClientMessage(playerid, COLOR_RED, "You can't kick a nother admin");
}
else if(id == INVALID_PLAYER_ID) {
return SendClientMessage(playerid,COLOR_RED, "That player isn't connected");
}
else{
new KickMessage[128]
new vName[MAX_PLAYER_NAME];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
GetPlayerName(id,vName,MAX_PLAYER_NAME);
format(KcikMessage,sizeof(KickMessage),"Admin: %s(%d) has kick %s(%d) Reason %s",pName,playerid,vName,id);
Kick(id);
}
return 1;
}
what is wrong here
Re: help me with this please. -
Andi_Evandy - 14.07.2012
pawn Код:
CMD:kick(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
new id;
new str[128];
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You may not use this command");
if(sscanf(params,"us",id,str)) return SendClientMessage(playerid,-1,"{000000}You may not use this command");
{
else if(id == playerid) {
return SendClientMessage(playerid,COLOR_RED,"You can kick your self");
}
else if(IsPlayerAdmin(id)) {
return SendClientMessage(playerid, COLOR_RED, "You can't kick a nother admin");
}
else if(id == INVALID_PLAYER_ID) {
return SendClientMessage(playerid,COLOR_RED, "That player isn't connected");
}
else{
new KickMessage[128]
new vName[MAX_PLAYER_NAME];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
GetPlayerName(id,vName,MAX_PLAYER_NAME);
format(KickMessage,sizeof(KickMessage),"Admin: %s(%d) has kick %s(%d) Reason %s",pName,playerid,vName,id);
Kick(id);
}
return 1;
}
just a typo and forgot a semicolon
Re: help me with this please. -
Gangster-rocks - 14.07.2012
Код:
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(415) : error 029: invalid expression, assumed zero
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(415) : warning 215: expression has no effect
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(415) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : warning 225: unreachable code
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : warning 217: loose indentation
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : error 029: invalid expression, assumed zero
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : error 017: undefined symbol "cmd_givecash"
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : error 029: invalid expression, assumed zero
C:\Documents and Settings\HP\Desktop\photos\pawno\lol3.pwn(435) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
pawn Код:
COMMAND:kick(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
new id;
new str[128];
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You may not use this command");
if(sscanf(params,"us",id,str)) return SendClientMessage(playerid,-1,"{000000}You may not use this command");
{
else if(id == playerid){
return SendClientMessage(playerid,COLOR_RED,"You can kick your self");
}
else if(IsPlayerAdmin(id)) {
return SendClientMessage(playerid, COLOR_RED, "You can't kick a nother admin");
}
else if(id == INVALID_PLAYER_ID) {
return SendClientMessage(playerid,COLOR_RED, "That player isn't connected");
}
else{
new KickMessage[128];
new vName[MAX_PLAYER_NAME];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,vName,sizeof(pName));
format(KickMessage,sizeof(KickMessage),"Admin: %s(%d) has kick %s(%d) Reason %s",pName,playerid,vName,id);
Kick(id);
}
return 1;
}
COMMAND:givecash(playerid, params[])
{
new
giveplayerid,
amount;
if (sscanf(params, "ud", giveplayerid, amount)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /givecash [playerid/partname] [amount]");
else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else if (amount > GetPlayerMoney(playerid)) SendClientMessage(playerid, 0xFF0000AA, "Insufficient Funds");
else
{
GivePlayerMoney(giveplayerid, amount);
GivePlayerMoney(playerid, 0 - amount);
SendClientMessage(playerid, 0x00FF00AA, "Money sent");
SendClientMessage(giveplayerid, 0x00FF00AA, "Money received");
}
return 1;
}
i've add it and its show this
Re: help me with this please. -
[MM]RoXoR[FS] - 14.07.2012
Fixed
pawn Код:
COMMAND:kick(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
new id;
new str[128];
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You may not use this command");
if(sscanf(params,"us",id,str)) return SendClientMessage(playerid,-1,"{000000}You may not use this command");
else if(id == playerid)
{
return SendClientMessage(playerid,COLOR_RED,"You can kick your self");
}
else if(IsPlayerAdmin(id))
{
return SendClientMessage(playerid, COLOR_RED, "You can't kick a nother admin");
}
else if(id == INVALID_PLAYER_ID)
{
return SendClientMessage(playerid,COLOR_RED, "That player isn't connected");
}
else
{
new KickMessage[128];
new vName[MAX_PLAYER_NAME];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,vName,sizeof(pName));
format(KickMessage,sizeof(KickMessage),"Admin: %s(%d) has kick %s(%d) Reason %s",pName,playerid,vName,id);
Kick(id);
}
return 1;
}
Re: help me with this please. -
Devilxz97 - 14.07.2012
show us lines 415
Re: help me with this please. -
Andi_Evandy - 14.07.2012
ah, i forgot the brackets XD.
RoXoR's script is right
Re: help me with this please. -
clarencecuzz - 14.07.2012
EDIT: I was watching Batman and forgot to press 'Submit' xD
Re: help me with this please. -
Andi_Evandy - 14.07.2012
--Sorry for Dopost--
I hate my connection -_-
Re: help me with this please. -
clarencecuzz - 14.07.2012
Just fixing up your command so it works out normally.
pawn Код:
COMMAND:kick(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
new id;
new str[128];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You may not use this command");
if(sscanf(params,"us",id,str)) return SendClientMessage(playerid,-1,"{000000}You may not use this command");
else if(id == playerid)
{
return SendClientMessage(playerid,COLOR_RED,"You can kick yourself");
}
else if(IsPlayerAdmin(id))
{
return SendClientMessage(playerid, COLOR_RED, "You can't kick another admin");
}
else if(id == INVALID_PLAYER_ID)
{
return SendClientMessage(playerid,COLOR_RED, "That player isn't connected");
}
else
{
new KickMessage[128];
new vName[MAX_PLAYER_NAME];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,vName,sizeof(pName));
format(KickMessage,sizeof(KickMessage),"Admin: %s(%d) has kicked %s(%d) Reason %s",pName,playerid,vName,id);
Kick(id);
}
return 1;
}
Re: help me with this please. -
leonardo1434 - 14.07.2012
Your command is all messed up.
pawn Код:
CMD:kick(playerid, params[])
{
new
id,
name[25],
namevictim[25],
reason[128],
str[128];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You may not use this command");
if(sscanf(params,"us",id,reason)) return SendClientMessage(playerid,-1,"USAGE:/kick [ID] [REASON]");
if(id == playerid) return SendClientMessage(playerid,COLOR_RED,"You can kick your self");
if(IsPlayerAdmin(id))return SendClientMessage(playerid, COLOR_RED, "You can't kick a nother admin");
if(!IsPlayerConnected(id))return SendClientMessage(playerid,COLOR_RED, "That player isn't connected");
GetPlayerName(playerid,name,25);
GetPlayerName(id,namevictim,25);
format(str,128,"Admin: %s(%d) has kick %s(%d) Reason %s",name,playerid,namevictim,id,reason);
SendClientMessageToAll(-1,str);
Kick(id);
return 1;
}