heeeelp
#1

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
Reply
#2

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.
pawn Код:
new string[128];
You don't add the 128 when you're formatting.
Reply
#3

I've added all what you've said and still the same errors show up.(NOTE: string[128] is really added from the start.)
Reply
#4

What's the line before 185? So 184. It could be because you forgot a simple ;.
Reply
#5

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
Reply
#6

Are you sure that this: new string[128] got a ';' at the end? Like this: string[128];
Reply
#7

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;
}
Reply
#8

Yes, as it was stated above.
Reply
#9

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
Reply
#10

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?!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)