Need help with a script
#1

Hello i get error and i understand i need to forward somthing can you guys show me how the line should be ? if any1 now how to solve this please let me now



pawn Код:
C:\Users\Alex\Desktop\Ownmade GM\gamemodes\Swedish.pwn(212) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:           4560 bytes
Code size:           165712 bytes
Data size:           219460 bytes
Stack/heap size:      16384 bytes; estimated max. usage=5318 cells (21272 bytes)
Total requirements:  406116 bytes

1 Warning.

Line 212
pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[]) {
Reply
#2

Remove that line.
Reply
#3

This line?
pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[]) {
Reply
#4

where should i place this script than?

pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
    if(!IsPlayerConnected(playerid)||!IsPlayerConnected(recieverid)) return 1;
    new string[256], ToName[24], Name[24]; GetPlayerName(playerid,Name,24);
    if(Config[ExposePMS]) {
        GetPlayerName(recieverid,ToName,24);
        format(string,256,"PM: %s [%d] -> %s [%d]: %s",Name,playerid,ToName,recieverid,text);
        SendMessageToAdmins(string);
    }
    if(Config[WireWithPM] && Variables[playerid][Wired]) {
        Variables[playerid][WiredWarnings]--;
        if(Variables[playerid][WiredWarnings]) {
            format(string,256,"You have been wired thus preventing you from talking and PMing. [Warnings: %d/%d]",Variables[playerid][WiredWarnings],Config[WiredWarnings]);
            SendClientMessage(playerid,white,string); return 0;
        }
        else {
            format(string,256,"%s has been kicked from the server. [REASON: Wired]",Name);
            SendClientMessageToAll(yellow,string); SetUserInt(playerid,"Wired",0);
            Kick(playerid); return 0;
        }
    }
    return 1;
}
Reply
#5

YOu probaly already have a
public OnPlayerPrivmsg(playerid, recieverid, text[])

So put your code inside the
public OnPlayerPrivmsg(playerid, recieverid, text[]) that already exists
Reply
#6

You are using an outdate GM that uses that old function.
Try:
pawn Код:
forward OnPlayerPrivmsg(playerid, recieverid, text[]);
Reply
#7

Yes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)