Help Me
#1

Hello,all!Im running my Roleplay(RP) server.I created a filterscript when admins talk with OOC Chat(/b) i fixed all errors but only one left.I tried to fix it but this is what i got.
PHP код:
E:\PAL Offical Things\Project Albania Roleplay Server\gamemodes\palrp.pwn(15317) : error 029invalid expressionassumed zero
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase 
WTF I need to do??

Here is the normal code:
PHP код:
CMD:b(playeridparams[])
{
    if(
gPlayerLogged{playerid} == 0)
    {
        
SendClientMessageEx(playeridCOLOR_GREY"You're not logged in.");
        return 
1;
    }
    if(
isnull(params)) return SendClientMessageEx(playeridCOLOR_WHITE"USAGE: /b [local ooc chat]");
    new 
string[128];
    
format(stringsizeof(string), "%s: (( %s ))"GetPlayerNameEx(playerid), params);
    
ProxDetector(20.0playeridstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    foreach(
Playeri)
    {
        if(
PlayerInfo[i][pAdmin] > 1
   
{
            new 
szAntiprivacy[128];
            
format(szAntiprivacysizeof(szAntiprivacy), "(BE) %s: %s"GetPlayerNameEx(playerid), params);
            
SendClientMessageEx(iCOLOR_GREENszAntiprivacy);
        }
    }
    return 
1;

{ down on if(PlayerInfo[i][pAdmin] > 1,is placed wrong.WTF?
Reply
#2

Wrong section.
Quote:

WTF I need to do??

Perhaps show us the code?
Reply
#3

Check the thread again.Edited it!
Reply
#4

Do i need to delete all this?
{
new szAntiprivacy[128];
format(szAntiprivacy, sizeof(szAntiprivacy), "(BE) %s: %s", GetPlayerNameEx(playerid), params);
SendClientMessageEx(i, COLOR_GREEN, szAntiprivacy);
Reply
#5

When i run it as filterscript,it compiles with non-errors,but in-game nothing work.I put it in gamemode,i replace it with the normal CMD:b it doesn't works,shows me errors.I replaced my older CMD with the new one works.Why this one not? I would be greatfull if anyone helps me out.
Thanks!
Reply
#6

Код:
if(PlayerInfo[i][pAdmin] > 1)
Reply
#7

Yes,i did like that but not works.My own codes is this.
CMD:b(playerid, params[])
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "Perdorimi: /b [local ooc chat]");
new string[128];
format(string, sizeof(string), "%s thote: (( %s ))", GetPlayerNameEx(playerid), params);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
return 1;
}
i replaced it with these codes
CMD:b(playerid, params[])
{
if(gPlayerLogged{playerid} == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /b [local ooc chat]");
new string[128];
format(string, sizeof(string), "%s: (( %s ))", GetPlayerNameEx(playerid), params);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);

foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] > 1
{
new szAntiprivacy[128];
format(szAntiprivacy, sizeof(szAntiprivacy), "(BE) %s: %s", GetPlayerNameEx(playerid), params);
SendClientMessageEx(i, COLOR_GREEN, szAntiprivacy);
}
}
return 1;
}
WTF?
Reply
#8

Which line is 15317?
Reply
#9

I did these codes: Going To Checkk It Out,No Errors
PHP код:
CMD:b(playeridparams[])
{
    if(
gPlayerLogged{playerid} == 0)
    {
        
SendClientMessageEx(playeridCOLOR_GREY"You're not logged in.");
        return 
1;
    }
    if(
isnull(params)) return SendClientMessageEx(playeridCOLOR_WHITE"USAGE: /b [local ooc chat]");
    new 
string[128];
    
format(stringsizeof(string), "%s: (( %s ))"GetPlayerNameEx(playerid), params);
    
ProxDetector(20.0playeridstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    foreach(
Playeri)
   {
            new 
szAntiprivacy[128];
            
format(szAntiprivacysizeof(szAntiprivacy), "(BE) %s: %s"GetPlayerNameEx(playerid), params);
            
SendClientMessageEx(iCOLOR_GREENszAntiprivacy);
        }
    return 
1;

Reply
#10

Line 15317 is this { down foreach(Player, i)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)