[DUV]ERROS AO COMPILAR
#1

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 (:
Reply
#2

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

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
Reply
#4

eu to boiando nesses erro vei :S
Reply
#5

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.
Reply
#6

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;
}
Reply
#7

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;
}
Reply
#8

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
Reply
#9

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);}

}
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)