SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 29/08/2013, 06:03 AM   #1
ZdupX
Little Clucker
 
Join Date: Mar 2013
Posts: 9
Reputation: 0
Default Error "function "PublicLog" is not implemented"

I tried to add the / OOC because recent is white and stands out.
When I tried to bag, I gave complicated and I gave it erroare.
function "PublicLog" Is Not Implemented

Code:
//----------------------------------[ooc]-----------------------------------------------
	if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0) //
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "** You havent logged in yet !");
                return 1;
            }
            if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
            {
                SendClientMessage(playerid, COLOR_GRAD2, "** The OOC channel has been disabled by an Admin !");
                return 1;
            }
            if(PlayerInfo[playerid][pMuted] == 1)
            {
                SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
                return 1;
            }
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[128];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [OOC chat]");
                return 1;
            }
            if(PlayerInfo[playerid][pAdmin] == 0)
            {
                format(string, sizeof(string), "(( %s ))", (result));
            }
            else
            {
                format(string, sizeof(string), "[[ %s ]]", (result));
            }
               SendPlayerMessageToAll(playerid, string);
            new year,month,day;
            getdate(year, month, day);
            new hour, minute, second;
            gettime(hour,minute,second);
            format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (OOC): (%s)",day,month,year,hour,minute,second, sendername, result);
            PublicLog(string[]);
        }
        return 1;
    }
ZdupX is offline   Reply With Quote
Old 29/08/2013, 08:33 AM   #2
Misiur
High-roller
 
Misiur's Avatar
 
Join Date: Jul 2009
Location: Poland
Posts: 2,528
Reputation: 556
Default Re: Error "function "PublicLog" is not implemented"

pawn Code:
PublicLog(string[])
//needs to change to
PublicLog(string)

If the error persists, you don't have a PublicLog function
Misiur is offline   Reply With Quote
Old 29/08/2013, 08:47 AM   #3
ZdupX
Little Clucker
 
Join Date: Mar 2013
Posts: 9
Reputation: 0
Default Re: Error "function "PublicLog" is not implemented"

How to add function?
ZdupX is offline   Reply With Quote
Old 29/08/2013, 09:36 AM   #4
Varkoll_
Huge Clucker
 
Varkoll_'s Avatar
 
Join Date: Dec 2009
Location: Peut-Ítre pas sur Terre ?
Posts: 247
Reputation: 61
Default Re: Error "function "PublicLog" is not implemented"

He just said to do it like this:
PHP Code:
    if(strcmp(cmd"/ooc"true) == || strcmp(cmd"/o"true) == 0//
    
{
        if(
IsPlayerConnected(playerid))
        {
            if(
gPlayerLogged[playerid] == 0)
            {
                
SendClientMessage(playeridCOLOR_GREY"** You havent logged in yet !");
                return 
1;
            }
            if ((
noooc) && PlayerInfo[playerid][pAdmin] < 1)
            {
                
SendClientMessage(playeridCOLOR_GRAD2"** The OOC channel has been disabled by an Admin !");
                return 
1;
            }
            if(
PlayerInfo[playerid][pMuted] == 1)
            {
                
SendClientMessage(playeridTEAM_CYAN_COLOR"You cannot speak, you have been silenced");
                return 
1;
            }
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            new 
offset idx;
            new 
result[128];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
            {
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
            if(!
strlen(result))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USAGE: (/o)oc [OOC chat]");
                return 
1;
            }
            if(
PlayerInfo[playerid][pAdmin] == 0)
            {
                
format(stringsizeof(string), "(( %s ))", (result));
            }
            else
            {
                
format(stringsizeof(string), "[[ %s ]]", (result));
            }
               
SendPlayerMessageToAll(playeridstring);
            new 
year,month,day;
            
getdate(yearmonthday);
            new 
hourminutesecond;
            
gettime(hour,minute,second);
            
format(stringsizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (OOC): (%s)",day,month,year,hour,minute,secondsendernameresult);
            
PublicLog(string);
        }
        return 
1;
    } 
There is no more problem right ?
__________________
Varkoll_ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: undefine symbol "j" and expected token ";" but found "]" JEkvall95 Scripting Help 9 27/07/2013 10:09 AM
Differences between "stock" "public" "normal function" ? Glint Scripting Help 5 18/09/2012 11:05 AM
ERROR:function "IsNumeric" is not implemented Faisal_khan Scripting Help 11 06/03/2012 10:45 AM
Have problem pls help me out... (error 004: function "SetPlayerTeamFromClass" is not implemented) Scrillex Scripting Help 2 24/01/2012 01:43 PM


All times are GMT. The time now is 04:09 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.