heeeelp -
Extraordinariness - 01.03.2014
LINE 185:
pawn Код:
format(string, 128, "[SERVER]: Player %s has been kicked from spamming.", GetName(playerid));
=
C:\Documents and Settings\samp\Desktop\SAMP Server\filterscripts\Admin_System.pwn(185) : error 012: invalid function call, not a valid address
C:\Documents and Settings\samp\Desktop\SAMP Server\filterscripts\Admin_System.pwn(185) : warning 215: expression has no effect
C:\Documents and Settings\samp\Desktop\SAMP Server\filterscripts\Admin_System.pwn(185) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\samp\Desktop\SAMP Server\filterscripts\Admin_System.pwn(185) : error 029: invalid expression, assumed zero
C:\Documents and Settings\samp\Desktop\SAMP Server\filterscripts\Admin_System.pwn(185) : fatal error 107: too many error messages on one line
Re: heeeelp -
rangerxxll - 01.03.2014
Try this.
pawn Код:
format(string,sizeof(string), "[SERVER]: Player %s has been kicked from spamming.", GetName(playerid));
Also, make sure your string is a maximum of 128 long.
You don't add the 128 when you're formatting.
Re: heeeelp -
Extraordinariness - 01.03.2014
I've added all what you've said and still the same errors show up.(NOTE: string[128] is really added from the start.)
Re: heeeelp -
rangerxxll - 01.03.2014
What's the line before 185? So 184. It could be because you forgot a simple ;.
Re: heeeelp -
Extraordinariness - 01.03.2014
pawn Код:
if(P_Data[playerid][pSpam] == 5) {
new string[128];
format(string, 128, "[SERVER]: Player %s has been kicked from spamming.", GetName(playerid));
SCMToAll(COLOR_RED,string);
Kick(playerid);
}
Mah script
Re: heeeelp -
ikbenremco - 01.03.2014
Are you sure that this: new string[128] got a ';' at the end? Like this: string[128];
Re: heeeelp -
rangerxxll - 01.03.2014
pawn Код:
if(P_Data[playerid][pSpam] == 5)
{
new string[128];
format(string,sizeof(string), "SERVER: Player %s has been kicked for spamming.",GetName(playerid));
SCMToAll(COLOR_RED,string);
Kick(playerid);
return 1;
}
Just made a few adjustments. See if it'll work.
EDIT: Also, make sure your "GetName" stock is proper.
pawn Код:
stock GetName(playerid)
{
new szName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szName, sizeof(szName));
return szName;
}
Re: heeeelp -
Extraordinariness - 01.03.2014
Yes, as it was stated above.
Re: heeeelp -
rakshith122 - 01.03.2014
pawn Код:
if(P_Data[playerid][pSpam] == 5) {
new string[128];
format(string,sizeof(string), "[SERVER]: Player %s has been kicked from spamming.", GetName(playerid));
SCMToAll(COLOR_RED,string);
Kick(playerid);
}
Try this.
EDIT: I was late, I just saw rangerxx's post now xd
Re: heeeelp -
Extraordinariness - 01.03.2014
pawn Код:
if(P_Data[playerid][pSpam] == 5)
{
new string[128];
format(string,sizeof(string), "SERVER: Player %s has been kicked for spamming.",GetName(playerid));
SCMToAll(COLOR_RED,string);
Kick(playerid);
return 1;
}
Still error'ing.
Dafuq is wrong with my fuking script?!