SA-MP Forums Archive
What's wrong? command error (rep+) - 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: What's wrong? command error (rep+) (/showthread.php?tid=315905)



What's wrong? command error (rep+) - boyan96 - 04.02.2012

PHP код:
    if(strcmp(cmd"/bo"true) == 0)
{
    if(
IsPlayerConnected(playerid) && (boxevent == 0) && if (PlayerInfo[playerid][pAdmin] >= 1337))
    {
        
boxevent 1;
        
BroadCast(COLOR_GREEN"   ***********!");
    }
    else if(
IsPlayerConnected(playerid) && (boxevent == 1))
    {
        if(
IsPlayerAdmin(playerid))
        {
            
boxevent 0;
            
BroadCast(COLOR_GREEN"  ***********.");
        }
    }
    return 
1;

errors
C:\Users\User\Desktop\j.pwn(125) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\j.pwn(125) : warning 215: expression has no effect
C:\Users\User\Desktop\j.pwn(125) : error 001: expected token: ";", but found ")"
C:\Users\User\Desktop\j.pwn(125) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\j.pwn(125) : fatal error 107: too many error messages on one line


Re: What's wrong? command error (rep+) - Konstantinos - 04.02.2012

pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if( strcmp( cmd, "/bo", true ) == 0 )
    {
        if( IsPlayerConnected( playerid ) )
        {
            if( boxevent == 0 && PlayerInfo[ playerid ][ pAdmin ] >= 1337 )
            {
                boxevent = 1;
                BroadCast( COLOR_GREEN, " ***************!" );
            }
            else if( boxevent == 1 && IsPlayerAdmin( playerid ) )
            {
                boxevent = 0;
                BroadCast( COLOR_GREEN, " ******************." );
            }
        }
        return 1;
    }
    // Rest
    return 0;
}



Re: What's wrong? command error (rep+) - boyan96 - 04.02.2012

Quote:
Originally Posted by Dwane
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if( strcmp( cmd, "/pay", true ) == 0 )
    {
        if( IsPlayerConnected( playerid ) )
        {
            if( boxevent == 0 && PlayerInfo[ playerid ][ pAdmin ] >= 1337 )
            {
                boxevent = 1;
                BroadCast( COLOR_GREEN, " ***************!" );
            }
            else if( boxevent == 1 && IsPlayerAdmin( playerid ) )
            {
                boxevent = 0;
                BroadCast( COLOR_GREEN, " ******************." );
            }
        }
        return 1;
    }
    // Rest
    return 0;
}
Thank you Rep +


Re: What's wrong? command error (rep+) - boyan96 - 04.02.2012

pawno doesn't give me error but the command didn't work