Error 001: expected token: ";", but found ")"
#1

Код:
C:\Users\user\Desktop\lewl RP\gamemodes\lewl.pwn(2355) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\lewl RP\gamemodes\lewl.pwn(2355) : warning 215: expression has no effect
C:\Users\user\Desktop\lewl RP\gamemodes\lewl.pwn(2355) : error 001: expected token: ";", but found ")"
C:\Users\user\Desktop\lewl RP\gamemodes\lewl.pwn(2355) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\lewl RP\gamemodes\lewl.pwn(2355) : fatal error 107: too many error messages on one line

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


4 Errors.
Line with error
PHP код:
 if( GetPlayerPing playerid ) > =100 
PHP код:
LoadObjectsForPlayer(playerid)
{
    if( 
IsPlayerConnected playerid ) )//checking if the player is connected
    
{
        
TogglePlayerControllableplayeridfalse ); // Freezing the player
        
if( GetPlayerPing playerid ) < 100 )
        {
            
SetTimerEx"ObjectsLoaded"30000"i"playerid );
        }
//the value of Time should be increased upon increasing ping
        
if( GetPlayerPing playerid ) > =100 )
        {
            
SetTimerEx"ObjectsLoaded"30000"i"playerid );
        }
// i stands for integer we passing playerid to function
        
if( GetPlayerPing playerid ) >= 200 && GetPlayerPing playerid )<300 )
        {
            
SetTimerEx"ObjectsLoaded"32000"i"playerid );
        }
        if( 
GetPlayerPing playerid ) > =300 && GetPlayerPing playerid )<500 )
        {
            
SetTimerEx"ObjectsLoaded"37000"i"playerid );
        }
        if( 
GetPlayerPing playerid ) >= 500)
        {
            
SetTimerEx"ObjectsLoaded"40000"i"playerid );
        }
        else
        {
            
SetTimerEx"ObjectsLoaded"50000"i"playerid );
        }
    }
    return 
1;
}
forward ObjectsLoaded(playerid);
public 
ObjectsLoaded(playerid)
{
    if( 
IsPlayerConnected playerid ) ) return TogglePlayerControllableplayeridtrue );
    return 
1;

Reply
#2

PHP код:
LoadObjectsForPlayer(playerid

    if( 
IsPlayerConnected playerid ) )//checking if the player is connected 
    

        
TogglePlayerControllableplayeridfalse ); // Freezing the player 
        
if( GetPlayerPing playerid ) < 100 
        { 
            
SetTimerEx"ObjectsLoaded"30000"i"playerid ); 
        }
//the value of Time should be increased upon increasing ping 
        
if( GetPlayerPing playerid ) >=100 
        { 
            
SetTimerEx"ObjectsLoaded"30000"i"playerid ); 
        }
// i stands for integer we passing playerid to function 
        
if( GetPlayerPing playerid ) >= 200 && GetPlayerPing playerid )<300 
        { 
            
SetTimerEx"ObjectsLoaded"32000"i"playerid ); 
        } 
        if( 
GetPlayerPing playerid ) >=300 && GetPlayerPing playerid )<500 
        { 
            
SetTimerEx"ObjectsLoaded"37000"i"playerid ); 
        } 
        if( 
GetPlayerPing playerid ) >= 500
        { 
            
SetTimerEx"ObjectsLoaded"40000"i"playerid ); 
        } 
        else 
        { 
            
SetTimerEx"ObjectsLoaded"50000"i"playerid ); 
        } 
    } 
    return 
1

forward ObjectsLoaded(playerid); 
public 
ObjectsLoaded(playerid

    if( 
IsPlayerConnected playerid ) ) return TogglePlayerControllableplayeridtrue ); 
    return 
1

EDIT: If that won't help write it like this
PHP код:
LoadObjectsForPlayerplayerid )
{
    if( 
IsPlayerConnected playerid ) )
    {
        
TogglePlayerControllableplayerid);
        if( 
GetPlayerPing playerid ) < 100 )      { SetTimerEx"ObjectsLoaded"30000"i"playerid );}
           if( 
GetPlayerPing playerid ) >= 100 ) { SetTimerEx"ObjectsLoaded"30000"i"playerid ); }
        if( 
GetPlayerPing playerid ) >= 200 && GetPlayerPing playerid )<300 ) { SetTimerEx"ObjectsLoaded"32000"i"playerid ); }
        if( 
GetPlayerPing playerid ) >= 300 && GetPlayerPing playerid )<500 ) { SetTimerEx"ObjectsLoaded"37000"i"playerid ); }
        if( 
GetPlayerPing playerid ) >= 500) { SetTimerEx"ObjectsLoaded"40000"i"playerid ); }
        else { 
SetTimerEx"ObjectsLoaded"50000"i"playerid ); }
    }
    return 
1;

Reply
#3

This should work far better.

pawn Код:
LoadObjectsForPlayer(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        TogglePlayerControllable(playerid, 0);
       
        switch(GetPlayerPing(playerid))
        {
            case 0..200:   SetTimerEx("ObjectsLoaded", 1500, 0, "i", playerid);
            case 200..500: SetTimerEx("ObjectsLoaded", 3000, 0, "i", playerid);
            default: SetTimerEx("ObjectsLoaded", 5000, 0, "i", playerid);
        }
    }
    return 1;
}
Reply
#4

DELTED POST
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)