(Help) error 012: invalid function call, not a valid address
#5

Quote:
Originally Posted by lulo356
Посмотреть сообщение
pawn Код:
format(file, sizeof(file), "Strike_Camionero/%s.ini", pName(playerid);
And this?
You need the two brackets at the end. One bracket is for the closing of (playerid) and the other one is the bracket that was opened by format(.

EDIT: I tried compiling your code and it worked. Can you give me the full code? (The code that happens before and after the code you showed).

I compiled it using this and it worked:

pawn Код:
#include <a_samp>
#include <dini>

enum pInfo
{
    pCamionero,
}
new PlayerInfo[MAX_PLAYERS][pInfo];


public OnPlayerSpawn(playerid)
{

    new file[80];
    format(file, sizeof(file),"Strike_Camionero/%s.ini", pName(playerid));

    if(dini_Exists(file))
    {
        PlayerInfo[playerid][pCamionero] = dini_Int(file,"Camionero");
    }

    return 1;
}

stock pName(playerid)
{
    new name[128];
    GetPlayerName(playerid, name, sizeof(name));

    return name;
}
Reply


Messages In This Thread
(Help) error 012: invalid function call, not a valid address - by NTVbeleza - 16.04.2014, 22:40
Re: (Help) error 012: invalid function call, not a valid address - by lulo356 - 16.04.2014, 23:55
Re: (Help) error 012: invalid function call, not a valid address - by NTVbeleza - 17.04.2014, 00:35
Re: (Help) error 012: invalid function call, not a valid address - by lulo356 - 17.04.2014, 06:15
Re: (Help) error 012: invalid function call, not a valid address - by Dignity - 17.04.2014, 06:29

Forum Jump:


Users browsing this thread: 2 Guest(s)