Undefined symbol string :-?
#1

Error:
PHP код:
gm.pwn(387) : error 017undefined symbol "string" 
Code:
PHP код:
public OnPlayerConnect(playerid)
{
    if(
fexist(string))
    {
        
gPlayerAccount[playerid] = 1;
    }
    else
    {
        
gPlayerAccount[playerid] = 0;
    }
    return 
1;

Reply
#2

You need to declare it first and even if you do, it's null (empty). You'll need to format it to your needs.
pawn Код:
public OnPlayerConnect(playerid)
{
    new
        string[ 32 ],
        _name[ MAX_PLAYER_NAME ]
    ;
    GetPlayerName( playerid, _name, MAX_PLAYER_NAME );
    format( string, sizeof( string ), "THE PATH GOES HERE", _name ); // CHANGE IT.
    if(fexist(string))
    {
        gPlayerAccount[playerid] = 1;
    }
    else
    {
        gPlayerAccount[playerid] = 0;
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You need to declare it first and even if you do, it's null (empty). You'll need to format it to your needs.
pawn Код:
public OnPlayerConnect(playerid)
{
    new
        string[ 32 ],
        _name[ MAX_PLAYER_NAME ]
    ;
    GetPlayerName( playerid, _name, MAX_PLAYER_NAME );
    format( string, sizeof( string ), "THE PATH GOES HERE", _name ); // CHANGE IT.
    if(fexist(string))
    {
        gPlayerAccount[playerid] = 1;
    }
    else
    {
        gPlayerAccount[playerid] = 0;
    }
    return 1;
}
Thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)