[Ajuda] Error no Salvar Contas
#1

pawn Код:
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(1281) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(1281) : warning 215: expression has no effect
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(1281) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(1281) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(1281) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
stock SalvarContas(playerid)
{
    new name[MAX_PLAYER_NAME];
    new arquivo[40];
    GetPlayerName(playerid, name, 32);
    format(arquivo, sizeof(arquivo), PASTA_CONTAS, name);
    if(!DOF2_FileExists(arquivo(playerid))) DOF2_CreateFile(arquivo(playerid)); // Linha 1281
    else
    {
        PlayerInfo[playerid][Dinheiro] = GetPlayerMoney(playerid);
        DOF2_SetInt(arquivo, "Senha", PlayerInfo[playerid][Senha]);
        DOF2_SetInt(arquivo, "Skin", PlayerInfo[playerid][Skin]);
        DOF2_SetInt(arquivo, "Idade", PlayerInfo[playerid][Idade]);
        DOF2_SetInt(arquivo, "Admin", PlayerInfo[playerid][Admin]);
        DOF2_SetInt(arquivo, "Sexo", PlayerInfo[playerid][Sexo]);
        DOF2_SetInt(arquivo, "Dinheiro", PlayerInfo[playerid][Dinheiro]);
        DOF2_SetInt(arquivo, "LaternaOn", PlayerInfo[playerid][LanternaOn]);
        DOF2_SetInt(arquivo, "Level", PlayerInfo[playerid][Level]);
        DOF2_SaveFile();
    }
    return 1;
}
Reply
#2

erro da estrutura condicional.

pawn Код:
stock SalvarContas(playerid)
{
    new name[MAX_PLAYER_NAME];
    new arquivo[40];
    GetPlayerName(playerid, name, 32);

    format(arquivo, sizeof(arquivo), "contas/leandro.ini", name);

    if(!DOF2_FileExists(arquivo))
        DOF2_CreateFile(arquivo);
   
    PlayerInfo[playerid][Dinheiro] = GetPlayerMoney(playerid);
    DOF2_SetInt(arquivo, "Senha", PlayerInfo[playerid][Senha]);
    DOF2_SetInt(arquivo, "Skin", PlayerInfo[playerid][Skin]);
    DOF2_SetInt(arquivo, "Idade", PlayerInfo[playerid][Idade]);
    DOF2_SetInt(arquivo, "Admin", PlayerInfo[playerid][Admin]);
    DOF2_SetInt(arquivo, "Sexo", PlayerInfo[playerid][Sexo]);
    DOF2_SetInt(arquivo, "Dinheiro", PlayerInfo[playerid][Dinheiro]);
    DOF2_SetInt(arquivo, "LaternaOn", PlayerInfo[playerid][LanternaOn]);
    DOF2_SetInt(arquivo, "Level", PlayerInfo[playerid][Level]);
    DOF2_SaveFile();
   
    return 1;
}
Reply
#3

Continua o erro
Reply
#4

Quote:
Originally Posted by eNtinityGaming
Посмотреть сообщение
Continua o erro
pawn Код:
stock SalvarContas(playerid)
{
    new name[MAX_PLAYER_NAME];
    new arquivo[40];
    GetPlayerName(playerid, name, sizeof(name));

    format(arquivo, sizeof(arquivo), PASTA_CONTAS, name);

    if(!DOF2_FileExists(arquivo))
        DOF2_CreateFile(arquivo);
   
    PlayerInfo[playerid][Dinheiro] = GetPlayerMoney(playerid);
    DOF2_SetInt(arquivo, "Senha", PlayerInfo[playerid][Senha]);
    DOF2_SetInt(arquivo, "Skin", PlayerInfo[playerid][Skin]);
    DOF2_SetInt(arquivo, "Idade", PlayerInfo[playerid][Idade]);
    DOF2_SetInt(arquivo, "Admin", PlayerInfo[playerid][Admin]);
    DOF2_SetInt(arquivo, "Sexo", PlayerInfo[playerid][Sexo]);
    DOF2_SetInt(arquivo, "Dinheiro", PlayerInfo[playerid][Dinheiro]);
    DOF2_SetInt(arquivo, "LaternaOn", PlayerInfo[playerid][LanternaOn]);
    DOF2_SetInt(arquivo, "Level", PlayerInfo[playerid][Level]);
    DOF2_SaveFile();
   
    return 1;
}
Reply
#5

pawn Код:
stock SalvarContas(playerid)
{
    new name[MAX_PLAYER_NAME], arquivo[40];
   
    format(arquivo, sizeof(arquivo), PASTA_CONTAS, (GetPlayerName(playerid, name, MAX_PLAYER_NAME), name));
    if(!DOF2_FileExists(arquivo))
        DOF2_CreateFile(arquivo);
   
    PlayerInfo[playerid][Dinheiro] = GetPlayerMoney(playerid);
    DOF2_SetInt(arquivo, "Senha", PlayerInfo[playerid][Senha]);
    DOF2_SetInt(arquivo, "Skin", PlayerInfo[playerid][Skin]);
    DOF2_SetInt(arquivo, "Idade", PlayerInfo[playerid][Idade]);
    DOF2_SetInt(arquivo, "Admin", PlayerInfo[playerid][Admin]);
    DOF2_SetInt(arquivo, "Sexo", PlayerInfo[playerid][Sexo]);
    DOF2_SetInt(arquivo, "Dinheiro", PlayerInfo[playerid][Dinheiro]);
    DOF2_SetInt(arquivo, "LaternaOn", PlayerInfo[playerid][LanternaOn]);
    DOF2_SetInt(arquivo, "Level", PlayerInfo[playerid][Level]);
    DOF2_SaveFile();
    return 1;
}
a variavel 'arquivo' n pode conter o parametro playerid

@ edit mals, demasiado lag aqui, ta uma porcaria este velho PC
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)