SA-MP Forums Archive
[DUV]ERROS AO COMPILAR - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [DUV]ERROS AO COMPILAR (/showthread.php?tid=154260)



[DUV]ERROS AO COMPILAR - Luuks - 13.06.2010

Ok , esse ai foi resolvido mais tem uns aqui

erros:
pawn Код:
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(163) : error 055: start of function body without function header
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(167) : error 010: invalid function or declaration
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(905) : error 055: start of function body without function header
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(906) : error 010: invalid function or declaration
linhas:
pawn Код:
163 a 167: {
    SetTimerEx("Timer",1000,true,"i",playerid);
}
{
    if(dini_Isset("levels.dkn",PlayerName(playerid)) Level[playerid] = (playerid,dini_Int("levels.dkn",PlayerName(palyerid)));

905 a 907: {
    if(!fexist("levels.dkn")) dini_Create("levels.dkn");
}
ESSE TOPICO ERA DA INCLUDE COMO FOI RESOLVIDO VOU APROVEITA-LO PARA TIRAR ESSAS DUVIDA TBM (:


Re: [DUV]Include Dini - [NNFc]MinDs - 13.06.2010

A sua include tem que estar na pasta ".../pawno/includes",
nгo pode estar na "/includes (do sa-mp server)."


Re: [DUV]Include Dini - zSuYaNw - 13.06.2010

Quote:
Originally Posted by [NNF
Minds. ]
A sua include tem que estar na pasta ".../pawno/includes",
nгo pode estar na "/includes (do sa-mp server)."
nгo includes, certo seria Include


Re: [DUV]Include Dini - Luuks - 13.06.2010

eu to boiando nesses erro vei :S


Re: [DUV]ERROS AO COMPILAR - SuB_ZeRo0_ - 13.06.2010

Quote:
Originally Posted by Luuks
linhas:
pawn Код:
163 a 167: {
    SetTimerEx("Timer",1000,true,"i",playerid);
}
{
    if(dini_Isset("levels.dkn",PlayerName(playerid)) Level[playerid] = (playerid,dini_Int("levels.dkn",PlayerName(palyerid)));

905 a 907: {
    if(!fexist("levels.dkn")) dini_Create("levels.dkn");
}
Era melhor postar mais! Tenta:

pawn Код:
163 a 167: {
    SetTimerEx("Timer",1000,true,"i",playerid);
}
    if(dini_Isset("levels.dkn",PlayerName(playerid)) {Level[playerid] = (playerid,dini_Int("levels.dkn",PlayerName(palyerid)));}
else {
    if(!fexist("levels.dkn")) dini_Create("levels.dkn");
}

Posta o cуdigo todo, assim ta dificil.


Re: [DUV]ERROS AO COMPILAR - Luuks - 13.06.2010

nao resolveu, esse sistema peguei um tutorial daqui mesmo vo posta o o codigo todo
pawn Код:
public OnPlayerConnect(playerid)
{
    SetTimerEx("Timer",1000,true,"i",playerid);
}
{
    if(dini_Isset("levels.dkn",PlayerName(playerid)) Level[playerid] = (playerid,dini_Int("levels.dkn",PlayerName(palyerid)));}
}
pawn Код:
public Timer(playerid)
{
    Respeito[playerid]++;
    SendClientMessage(playerid,0x33AA33AA,"Parabens Vocк Aumentou seu Respeito Mais um Pouco Vocк Upa o Level");
    if(Respeito[playerid] == 5)
{
    Level[playerid]++;
    SendClientMessage(playerid,0x33AA33AA,"Parabens Vocк Upou um Level!");
    Respeito[playerid] = 0;
}
    return 1;
}
stock PlayerName(playerid)
{
    new PlayerNameLevel[MAX_PLAYERS];
    GetPlayerName(playerid, PlayerNameLevel, MAX_PLAYERS);
    return PlayerNameLevel;
}
pawn Код:
Em OnGameModInit
{
    if(!fexist("levels.dkn")) dini_Create("levels.dkn");

}
pawn Код:
Em OnPlayerConnect
public OnPlayerConnect(playerid)

{
    SetTimerEx("Timer",1000,true,"i",playerid);
}
{
    if(dini_Isset("levels.dkn",PlayerName(playerid)) Level[playerid] = (playerid,dini_Int("levels.dkn",PlayerName(palyerid)));}
}
pawn Код:
Final do GM;
stock PlayerName(playerid)
{
new PlayerNameLevel[MAX_PLAYERS];
GetPlayerName(playerid, PlayerNameLevel, MAX_PLAYERS);
return PlayerNameLevel;
}



Re: [DUV]ERROS AO COMPILAR - CyNiC - 13.06.2010

Assim deve funcionar.
pawn Код:
#include <a_samp>
#include <Dini>
forward Timer(playerid);

new Level[MAX_PLAYERS],Respeito[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
SetTimerEx("Timer",1000,true,"i",playerid);
if(dini_Isset("levels.dkn",PlayerName(playerid))) Level[playerid] = dini_Int("levels.dkn",PlayerName(playerid));
else dini_IntSet("levels.dkn",PlayerName(playerid),0);
return 1;
}

public OnGameModeInit()
{
    if(!fexist("levels.dkn")) dini_Create("levels.dkn");
    return 1;
}

public Timer(playerid)
{
    Respeito[playerid]++;
    SendClientMessage(playerid,0x33AA33AA,"Parabens Vocк Aumentou seu Respeito Mais um Pouco Vocк Upa o Level");
    if(Respeito[playerid] == 5)
{
    Level[playerid]++;
    SendClientMessage(playerid,0x33AA33AA,"Parabens Vocк Upou um Level!");
    Respeito[playerid] = 0;
}
    return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
dini_IntSet("levels.dkn",PlayerName(playerid),Level[playerid]);
return 1;
}
stock PlayerName(playerid)
{
    new PlayerNameLevel[MAX_PLAYERS];
    GetPlayerName(playerid, PlayerNameLevel, MAX_PLAYERS);
    return PlayerNameLevel;
}



Re: [DUV]ERROS AO COMPILAR - Luuks - 14.06.2010

tentei dos dois jeitos e dao erro , e mais erro ainda --'

pawn Код:
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(161) : error 055: start of function body without function header
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(163) : error 010: invalid function or declaration
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(164) : error 010: invalid function or declaration
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(165) : error 010: invalid function or declaration
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(173) : error 055: start of function body without function header
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(174) : error 021: symbol already defined: "dini_IntSet"
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(174) : error 010: invalid function or declaration
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(174 -- 175) : error 010: invalid function or declaration
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(174 -- 175) : fatal error 107: too many error messages on one line



Re: [DUV]ERROS AO COMPILAR - SuB_ZeRo0_ - 14.06.2010

Mude: (1 respeito a cada 10 minutos, pode fazer salvar respeito tbm se quiser)

pawn Код:
public OnPlayerConnect(playerid)
{
    SetTimerEx("Timer",600000,true,"i",playerid);
    if(dini_Isset("levels.dkn",PlayerName(playerid)) {Level[playerid] = (playerid,dini_Int("levels.dkn",PlayerName(playerid)));}
    return 1;
}
pawn Код:
public Timer(playerid)
{
    Respeito[playerid]++;
    SendClientMessage(playerid,0x33AA33AA,"Parabens Vocк Aumentou seu Respeito Mais um Pouco Vocк Upa o Level");
    if(Respeito[playerid] == 5)
{
    Level[playerid]++;
    dini_IntSet("levels.dkn",PlayerName(playerid),Level[playerid]);
    SendClientMessage(playerid,0x33AA33AA,"Parabens Vocк Upou um Level!");
    Respeito[playerid] = 0;
}
    return 1;
}
pawn Код:
stock PlayerName(playerid)
{
    new PlayerNameLevel[25];
    GetPlayerName(playerid, PlayerNameLevel, 25);
    return PlayerNameLevel;
}
pawn Код:
Em OnGameModInit
{
    if(!fexist("levels.dkn")) {new File:Ne=fopen("levels.dkn",io_write);fclose(Ne);}

}



Re: [DUV]ERROS AO COMPILAR - Luuks - 14.06.2010

fis do mesmo jeito acima e os erros continuam ;\ dini ta fods
linhas:
pawn Код:
161 б 164 {
SetTimerEx("Timer",600000,true,"i",playerid);
if(dini_Isset("levels.dkn",PlayerName(playerid)) {Level[playerid] = (playerid,dini_Int("levels.dkn",PlayerName(playerid)));}
return 1;
pawn Код:
172 a 173 {
    dini_IntSet("levels.dkn",PlayerName(playerid),Level[playerid]);
    return 1;

pawn Код:
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(161) : error 055: start of function body without function header
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(163) : error 010: invalid function or declaration
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(164) : error 010: invalid function or declaration
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(172) : error 055: start of function body without function header
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(173) : error 021: symbol already defined: "dini_IntSet"
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(173) : error 017: undefined symbol "playerid"
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(173) : error 010: invalid function or declaration
C:\DOCUME~1\LUCASA~1\MEUSDO~1\Pawn\GAMEMO~1\lvdm.pwn(173 -- 174) : fatal error 107: too many error messages on one line