Clear chat
#1

Here is my code wtf is wrong
4 errors
pawn Код:
if (strcmp("/Clearchat", cmdtext, true, 10) == 0)
    {
  if(PlayerInfo[playerid][pAdminLevel] >= 1) {
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        SendClientMessageToAll(COLOR_WHITE, " ");
        GameTextForAll("Chat cleared By An Admin!", 1000,1);

        return 1;
    }
    return 0;
}
Errors
Код:
D:\Gta\Pwano\filterscripts\BJAdmSystem.pwn(137) : error 017: undefined symbol "PlayerInfo"
D:\Gta\Pwano\filterscripts\BJAdmSystem.pwn(137) : warning 215: expression has no effect
D:\Gta\Pwano\filterscripts\BJAdmSystem.pwn(137) : error 001: expected token: ";", but found "]"
D:\Gta\Pwano\filterscripts\BJAdmSystem.pwn(137) : error 029: invalid expression, assumed zero
D:\Gta\Pwano\filterscripts\BJAdmSystem.pwn(137) : fatal error 107: too many error messages on one line

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


4 Errors.
What's wrong
If someone know please tell me a right code
Reply
#2

.................................................. ..............
try :-

if (strcmp(cmdtext,"/Clearchat", true, 10) == 0)
Reply
#3

Your player enum is wrong. Take a look at your enum, maybe you have 'pInfo' or such...
And don't use SendClientMessageToAll() 11 times when you can speed it up and shorten it with a loop.
Reply
#4

Код:
if (strcmp(cmdtext, "/Clearchat", true, 10) == 0)
    {
  if(PlayerInfo[playerid][pAdminLevel] >= 1) {
        for(new i =0; i<=11; i++) SendClientMessageToAll(COLOR_WHITE, " ");
        GameTextForAll("Chat cleared By An Admin!", 1000,1);
        return 1;
    }
    return 0;
}
Reply
#5

The first line of the script already shows that you shouldn't even think about scripting for a community for free.
Reply
#6

Quote:

BASITJALIL's signature
Searching For a good Community
I'll Script for free
Requirements
Must Have 10 Players Online In Night
Must Hosted

LOL!!!! +1 Retardedwolf
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)