Help script CLEARED CHAT
#1

Eh I made a script that can clean pet me to do it turn out we erori here Eror D:\Old City\gamemodes\OldCity.pwn(123) : error 017: undefined symbol "PlayerInfo"
D:\Old City\gamemodes\OldCity.pwn(123) : warning 215: expression has no effect
D:\Old City\gamemodes\OldCity.pwn(123) : error 001: expected token: ";", but found "]"
D:\Old City\gamemodes\OldCity.pwn(123) : error 029: invalid expression, assumed zero
D:\Old City\gamemodes\OldCity.pwn(123) : fatal error 107: too many error messages on one line

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


4 Errors.

If you can help
here's a script
//CMDDDDD
COMMAND:clearedchat (playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1, "You are not authorized");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
return 1;
}
#define SCMA SendClientMessageToAll
Reply
#2

pawn Код:
CMD:clearedchat(playerid,params[])
{
  if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1, "You are not authorized");
  for(new i = 0; i < 100; i++) SendClientMessageToAll(-1,"");


  return 1;
}
Reply
#3

Quote:
Originally Posted by Sanel123
Посмотреть сообщение
Eh I made a script that can clean pet me to do it turn out we erori here Eror D:\Old City\gamemodes\OldCity.pwn(123) : error 017: undefined symbol "PlayerInfo"
D:\Old City\gamemodes\OldCity.pwn(123) : warning 215: expression has no effect
D:\Old City\gamemodes\OldCity.pwn(123) : error 001: expected token: ";", but found "]"
D:\Old City\gamemodes\OldCity.pwn(123) : error 029: invalid expression, assumed zero
D:\Old City\gamemodes\OldCity.pwn(123) : fatal error 107: too many error messages on one line

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


4 Errors.

If you can help
here's a script
//CMDDDDD
COMMAND:clearedchat (playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1, "You are not authorized");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
return 1;
}
#define SCMA SendClientMessageToAll
Thats how it suppose to look
PHP код:
COMMAND:clearedchat (playeridparams[])
{
    if(
pInfo[playerid][Admin] < 1) return SCM(playerid, -1"You are not authorized");
    {
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
        
SCMA(-1," ");
    }
    return 
1;

Reply
#4

Erors D:\Old City\gamemodes\OldCity.pwn(123) : error 017: undefined symbol "PlayerInfo"
D:\Old City\gamemodes\OldCity.pwn(123) : warning 215: expression has no effect
D:\Old City\gamemodes\OldCity.pwn(123) : error 001: expected token: ";", but found "]"
D:\Old City\gamemodes\OldCity.pwn(123) : error 029: invalid expression, assumed zero
D:\Old City\gamemodes\OldCity.pwn(123) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#5

Player info is not even defined, how does your other commands work?

pawn Код:
new PlayerInfo[MAX_PLAYERS][pinfo];
enum pinfo
{
   Admin
};
Reply
#6

PHP код:
for(new 015i++){SCMA(-1," ");} 
Use the code above instead of
PHP код:
SCMA
SCMA
SCMA
SCMA
...
...
...
... 
Reply
#7

PHP код:
#define SCMA(%0,%1) SendClientMessageToAll(%0,%1) 
COMMAND:clearedchat (playeridparams[])
{
if(
PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1"You are not authorized");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
SCMA(-1," ");
return 
1;

If you really don't wanna loop, Try this. But looping is 10x better.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)