[Ajuda] Erro em uma Fs
#1

pawn Код:
#include <Dini>
#include <Dutils>  
#include <Dudb>  
#include <a_samp>

#pragma unused ret_memcpy

#define savefolder "/contas/%s.ini"

//= VARIAVEL

new Killz[MAX_PLAYERS];       // We have used this variable because to save the kills of the player
new Deathz[MAX_PLAYERS];  // Same on here

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
new pname[128];  // This get's the length of the player name
new file[128];        // This get's the lenght of the file
GetPlayerName(playerid, pname, sizeof(pname)); // This get's the player name with the lenght of the player name
format(file, sizeof(file), savefolder,pname); // This describe's where to save and how to save it
if(!dini_Exists(file)) { // If the file exist
dini_Create(file); // Create the file
dini_IntSet(file, "Score", 0); // Set's "Score"
dini_IntSet(file, "Money", 0); // Set's "Money"
dini_IntSet(file, "Kills", Killz[playerid]); // Set's "Kills"
dini_IntSet(file, "Deaths", Deathz[playerid]); // Set's "Deaths"
dini_IntSet(file, "Skin", 0); // Set's Skin
SetPlayerScore(playerid, dini_Int(file, "Score")); // This describes where to load the score
SetPlayerMoney(playerid, dini_Int(file, "Money")); // This describes where to load the money
SetPlayerSkin(playerid, dini_Int(file, "Skin")); // This describes where to load the skin        // and at last this set's the value which were on the file
}
else
{
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Money"));
SetPlayerSkin(playerid, dini_Int(file, "Skin"));
}
    return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new pname[128]; // The name length
new file[128]; // The file length
GetPlayerName(playerid, pname, sizeof(pname)); //  This get's the player name with the name length
format(file, sizeof(file), savefolder,pname); // Formatting file
if(!dini_Exists(file)) { // If the file exist
}
 else
 {
 dini_IntSet(file, "Score", GetPlayerScore(playerid)); // This Get the Score
 dini_IntSet(file, "Money", GetPlayerMoney(playerid)); // This Get the cash
 dini_IntSet(file, "Kills", Killz[playerid]);  // This get the kills
 dini_IntSet(file, "Deaths", Deathz[playerid]); // This get the Deaths
 dini_IntSet(file, "Skin", GetPlayerSkin(playerid)); // This get the skin
 }
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
Killz[killerid] ++; // The killer value will be increased
Deathz[playerid] ++; // The death value will be increased
    return 1;
}



ERROS:


Код:
C:\Users\GABRIEL\Desktop\LifeisGood\pawno\include\dutils.inc(22) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\GABRIEL\Desktop\LifeisGood\pawno\include\dutils.inc(22) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\GABRIEL\Desktop\LifeisGood\pawno\include\dutils.inc(201) : error 017: undefined symbol "GivePlayerMoney"
C:\Users\GABRIEL\Desktop\LifeisGood\pawno\include\dutils.inc(201) : warning 215: expression has no effect
C:\Users\GABRIEL\Desktop\LifeisGood\pawno\include\dutils.inc(201) : error 017: undefined symbol "GetPlayerMoney"
C:\Users\GABRIEL\Desktop\LifeisGood\pawno\include\dutils.inc(201) : warning 215: expression has no effect
C:\Users\GABRIEL\Desktop\LifeisGood\pawno\include\dutils.inc(201) : error 001: expected token: ";", but found ")"
C:\Users\GABRIEL\Desktop\LifeisGood\pawno\include\dutils.inc(201) : fatal error 107: too many error messages on one line

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


6 Errors.
OBS: A linha 22 estб vazia e a linha 201 nгo existe...

Aonde esta o erro.. й no INCLUIDE ?
Reply
#2



Apenas concertei algumas coisas, se algum erro persistir, o problema й na sua include.
pawn Код:
#include <a_samp>
#include <Dini>
#include <Dutils>  
#include <Dudb>  

#pragma unused ret_memcpy

#define savefolder "/contas/%s.ini"

//= VARIAVEL

new Killz[MAX_PLAYERS];  
new Deathz[MAX_PLAYERS];

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}
public OnGameModeInit()
{
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    new pname[128];  // This get's the length of the player name
    new file[128];        // This get's the lenght of the file
    GetPlayerName(playerid, pname, sizeof(pname)); // This get's the player name with the lenght of the player name
    format(file, sizeof(file), savefolder,pname); // This describe's where to save and how to save it
    if(!dini_Exists(file))
    { // If the file exist
        dini_Create(file); // Create the file
        dini_IntSet(file, "Score", 0); // Set's "Score"
        dini_IntSet(file, "Money", 0); // Set's "Money"
        dini_IntSet(file, "Kills", Killz[playerid]); // Set's "Kills"
        dini_IntSet(file, "Deaths", Deathz[playerid]); // Set's "Deaths"
        dini_IntSet(file, "Skin", 0); // Set's Skin
        SetPlayerScore(playerid, dini_Int(file, "Score")); // This describes where to load the score
        SetPlayerMoney(playerid, dini_Int(file, "Money")); // This describes where to load the money
        SetPlayerSkin(playerid, dini_Int(file, "Skin")); // This describes where to load the skin        // and at last this set's the value which were on the file
    }
    else
    {
        SetPlayerScore(playerid, dini_Int(file, "Score"));
        SetPlayerMoney(playerid, dini_Int(file, "Money"));
        SetPlayerSkin(playerid, dini_Int(file, "Skin"));
    }
    return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    new pname[128]; // The name length
    new file[128]; // The file length
    GetPlayerName(playerid, pname, sizeof(pname)); //  This get's the player name with the name length
    format(file, sizeof(file), savefolder,pname); // Formatting file
    if(!dini_Exists(file)) { // If the file exist
    }
    else
    {
         dini_IntSet(file, "Score", GetPlayerScore(playerid)); // This Get the Score
         dini_IntSet(file, "Money", GetPlayerMoney(playerid)); // This Get the cash
         dini_IntSet(file, "Kills", Killz[playerid]);  // This get the kills
         dini_IntSet(file, "Deaths", Deathz[playerid]); // This get the Deaths
         dini_IntSet(file, "Skin", GetPlayerSkin(playerid)); // This get the skin
    }
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    Killz[killerid] ++; // The killer value will be increased
    Deathz[playerid] ++; // The death value will be increased
    return 1;
}
Reply
#3

Pode salvar isso em Pastebin, isso sai em apenas uma linha.. Obrigado
Reply
#4

Quote:
Originally Posted by JOKERBOY
Посмотреть сообщение
Pode salvar isso em Pastebin, isso sai em apenas uma linha.. Obrigado
Pastebin.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)