Error "function "PublicLog" is not implemented" -
ZdupX - 29.08.2013
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;
}
Re: Error "function "PublicLog" is not implemented" -
Misiur - 29.08.2013
pawn Code:
PublicLog(string[])
//needs to change to
PublicLog(string)
If the error persists, you don't have a PublicLog function
Re: Error "function "PublicLog" is not implemented" -
ZdupX - 29.08.2013
How to add function?
Re: Error "function "PublicLog" is not implemented" -
Varkoll_ - 29.08.2013
He just said to do it like this:
PHP Code:
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;
}
There is no more problem right ?