[Ajuda] Erro na Include baixada no Tуpico oficial? - 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: [Ajuda] Erro na Include baixada no Tуpico oficial? (
/showthread.php?tid=562072)
Erro na Include baixada no Tуpico oficial? -
Mackdaddy - 06.02.2015
Код:
C:\Users\Luiz\Documents\SAMP 0.3z Server\pawno\include\losgs.inc(1) : error 010: invalid function or declaration
Baixei a include Losgs no tуpico oficial dela:
https://sampforum.blast.hk/showthread.php?tid=293534
E quando vou tentar compilar o GM, dб erro na include
Cуdigo da include: (Nгo modifiquei nada na include, й porque ela vem em TXT, eu simplesmente abri o TXT e o salvei como .inc pra funcionar.
Код:
/*
native CreateLog(const file[]);
native WriteLog(const file[], string[]);
native RemoveLog(const file[]);
native LogExists(const file[]);
*/
#define LogExists fexist
stock CreateLog(const file[])
{
if(LogExists(file ) )
{
print("--------------------------------------------------------------------");
printf("Losgs: Vocк estб tentando criar um log jб existente (%s)", file);
print("Losgs: Consulte o tуpico oficial para mais informaзхes.");
print("Losgs: https://sampforum.blast.hk/showthread.php?tid=293534");
print("--------------------------------------------------------------------");
return 0;
}
new
File: logFile = fopen(file, io_write);
fclose(logFile);
return 1;
}
stock WriteLog(const file[], string[], maxlength = sizeof(string))
{
if(!LogExists(file))
CreateLog(file);
new
year,
month,
day,
hour,
minute,
second,
stringLog[600];
getdate(year, month, day);
gettime(hour, minute, second);
format(stringLog, maxlength + 27, "(%02d/%02d/%d)[%02d:%02d:%02d] %s\r\n", day, month, year, hour, minute, second, string);
new
File: logFile = fopen(file, io_append);
fwrite(logFile, stringLog);
fclose(logFile);
return 1;
}
stock RemoveLog(const file[])
{
if(!LogExists(file))
{
print("--------------------------------------------------------------------");
printf("Losgs: Vocк estб tentando deletar um log que nгo existe (%s)", file);
print("Losgs: Consulte o tуpico oficial para mais informaзхes.");
print("Losgs: https://sampforum.blast.hk/showthread.php?tid=293534");
print("--------------------------------------------------------------------");
return 0;
}
fremove(file);
return 1;
}
Re: Erro na Include baixada no Tуpico oficial? -
Tugamars - 06.02.2015
Qual й o erro ?
Re: Erro na Include baixada no Tуpico oficial? -
Mackdaddy - 06.02.2015
O Erro tava antes de tudo do tуpico, mas nгo precisa mais nгo, eu jб consertei, o criador da include botou as natives antes das #define, sу troquei as posiзхes, botei a #define antes das natives e funcionou perfeitamente, nгo deu nenhum BUG e o GM compilou com sucesso