Error ! Need Help
#1

I am getting error in this ↓

pawn Код:
else if(IsPlayerConnected[playerid] == 1)
    {
    GameTextForPlayer(playerid, " ~w~ Sorry, No player is online in the server.", 5000, 3);
    }
I am getting these errors ↓

pawn Код:
error 028: invalid subscript (not an array or too many subscripts): "IsPlayerConnected"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
need help quick.

Thanks.
Reply
#2

No need return 1;?
Reply
#3

check this completely ↓

pawn Код:
public ifconnected(playerid)
{
    new Float:health;
    GetPlayerHealth( playerid,health );
    if ( health > 0 )
    {
    new name[ 24 ], string[ 64 ];
    GetPlayerName( playerid, name, 24 );
    format( string, sizeof(string), "~w~you are winner.", name );
    GameTextForAll( string, 5000, 3 );
    }
    else if(IsPlayerConnected[playerid] == 1)
    {
    GameTextForPlayer(playerid, "~w~ Sorry no one is online in the server.", 5000, 3);
    }
    return 1;
}
Reply
#4

Try this:
pawn Код:
public ifconnected(playerid)
{
    new Float:health;
    GetPlayerHealth( playerid,health );
    if ( health > 0 )
    {
    new name[ 24 ], string[ 64 ];
    GetPlayerName( playerid, name, 24 );
    format( string, sizeof(string), "~w~you are winner.", name );
    GameTextForAll( string, 5000, 3 );
    }
    else if(IsPlayerConnected(playerid))
    {
    GameTextForPlayer(playerid, "~w~ Sorry no one is online in the server.", 5000, 3);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)