SA-MP Forums Archive
"ClearChatbox" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: "ClearChatbox" (/showthread.php?tid=289862)



"ClearChatbox" - KoDeX - 13.10.2011

Hello, Can you help me ?

HTML Code:
error 004: function "ClearChatbox" is not implemented.
What am i going to do?


Re: "ClearChatbox" - Dripac - 13.10.2011

pawn Code:
if (strcmp(cmd, "/clearchat", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    return SendClientMessage(playerid, 0xAFAFAFAA, "[USAGE]: /clearchat [line]");
                }
                new lin = strval(tmp);
                if(lin < 1) return SendClientMessage(playerid,0xAFAFAFAA, "    Error !");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                for(new i=0; i<GetMaxPlayers(); i++) ClearChatbox(i,lin);
            }
        }
        return 1;
    }
 
stock ClearChatbox(playerid, lines)
{
        if (IsPlayerConnected(playerid))
        {
                for(new i=0; i<lines; i++)
                {
                        SendClientMessage(playerid, 0xAFAFAFAA, " ");
                }
        }
        return 1;
}



Re: "ClearChatbox" - KoDeX - 13.10.2011

Quote:
Originally Posted by Dripac
View Post
pawn Code:
if (strcmp(cmd, "/clearchat", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    return SendClientMessage(playerid, 0xAFAFAFAA, "[USAGE]: /clearchat [line]");
                }
                new lin = strval(tmp);
                if(lin < 1) return SendClientMessage(playerid,0xAFAFAFAA, "    Error !");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                for(new i=0; i<GetMaxPlayers(); i++) ClearChatbox(i,lin);
            }
        }
        return 1;
    }
 
stock ClearChatbox(playerid, lines)
{
        if (IsPlayerConnected(playerid))
        {
                for(new i=0; i<lines; i++)
                {
                        SendClientMessage(playerid, 0xAFAFAFAA, " ");
                }
        }
        return 1;
}
the same


Re: "ClearChatbox" - Dripac - 13.10.2011

Do you get only this one error?


Re: "ClearChatbox" - KoDeX - 13.10.2011

HTML Code:
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1737) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1743) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1757) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1763) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1784) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1790) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1800) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1806) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1816) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1822) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1832) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1838) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1848) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1854) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1864) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1870) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1880) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1886) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1896) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1902) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1912) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1918) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1928) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1934) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1944) : error 004: function "ClearChatbox" is not implemented
C:\Documents and Settings\Nick\Desktop\IL PADRINO\gamemodes\gf.pwn(1950) : error 004: function "ClearChatbox" is not implemented

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.



Re: "ClearChatbox" - Dripac - 13.10.2011

You are missing a bracket somewhere in your script, it's not about clearchatbox.

If you can't find it, try this https://sampforum.blast.hk/showthread.php?tid=171429


Re: "ClearChatbox" - KoDeX - 13.10.2011

Thanks


Re: "ClearChatbox" - Joe Staff - 13.10.2011

No, if he was missing a bracket then he would have more errors.

He's literally just missing the ClearChatBox function.


Before copying and pasting code, try understanding it first.


Re: "ClearChatbox" - Dripac - 13.10.2011

Quote:
Originally Posted by Joe Staff
View Post
No, if he was missing a bracket then he would have more errors.

He's literally just missing the ClearChatBox function.


Before copying and pasting code, try understanding it first.
26 errors = always a bracket missing


Re: "ClearChatbox" - Joe Staff - 13.10.2011

Quote:
Originally Posted by Dripac
View Post
26 errors = always a bracket missing
26 errors = the pawn compiler stops compiling because you clearly messed up somewhere. you can make a perfectly good working script but add 27 different variables that aren't initiated, and only 26 of them will show.