18.08.2012, 13:02
Primeiramente nao intendo esse sistema de salvamento porem presciso usar ele !!!
Pra comeзar ele da erro ...
Linhas
Como nao me importo ai vai o code completo
Aprveitando o topico ...
Queria que isso checasse se o player nao loga a 12 dias mas seila nao e bem assim que eu fiz kkkkk
Desde ja obrigado!!!!!!
Pra comeзar ele da erro ...
pawn Код:
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(37) : error 017: undefined symbol "ano"
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(38) : error 017: undefined symbol "month"
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(39) : error 017: undefined symbol "dia"
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(40) : error 017: undefined symbol "horas"
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(41) : error 017: undefined symbol "minutos"
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(42) : error 017: undefined symbol "segundos"
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(49) : error 035: argument type mismatch (argument 2)
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(51) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(52) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(53) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(54) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(55) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(56) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(57) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(58) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(59) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(60) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(61) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(62) : error 033: array must be indexed (variable "month")
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(64) : error 017: undefined symbol "PFile"
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(64) : error 017: undefined symbol "file"
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(65) : error 017: undefined symbol "file"
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(65) : error 017: undefined symbol "file"
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(65) : error 029: invalid expression, assumed zero
C:\Users\Mauricio\Desktop\SAMPSERVER\gamemodes\Inactived.pwn(65) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
25 Errors.
pawn Код:
forward LoadHours(playerid);
public LoadHours(playerid)
{
new ParameterValue[50];
if (strcmp(DName, "Uano", false) == 0) format(ano, 50, ParameterValue);// Linha 37
if (strcmp(DName, "Umonth", false) == 0) format(month, 50, ParameterValue);// Linha 38
if (strcmp(DName, "Udia", false) == 0) format(dia, 50, ParameterValue); // Linha 40
if (strcmp(DName, "Uhoras", false) == 0) format(horas, 50, ParameterValue); // Linha 41
if (strcmp(DName, "Uminutos", false) == 0) format(minutos, 50, ParameterValue); // Linha 42
if (strcmp(DName, "Usegundos", false) == 0)format(segundos, 50, ParameterValue); // Linha 43
return true; // Linha 44
}// Linha 45
forward SalveHours(playerid); // Linha 46
public SalveHours(playerid) // Linha 47
{ // Linha 48
new ano,month[12],dia,horas,minutos,segundos, mes[13]; // Linha 49
getdate(ano, month, dia); // Linha 50
gettime(horas,minutos,segundos); // Linha 51
if(month == 1) mes = "01"; // Linha 52
else if(month == 2) mes = "02"; // Linha 53
else if(month == 3) mes = "03"; // Linha 54
else if(month == 4) mes = "04"; // Linha 55
else if(month == 5) mes = "05"; // Linha 56
else if(month == 6) mes = "06"; // Linha 57
pawn Код:
#include a_samp
new DName[MAX_PLAYER_NAME];
public OnFilterScriptInit()
{
SetTimer("ContasInativas", 1000, true);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
LoadHours(playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SalveHours(playerid);
return 1;
}
forward LoadHours(playerid);
public LoadHours(playerid)
{
new ParameterValue[50];
if (strcmp(DName, "Uano", false) == 0) format(ano, 50, ParameterValue);// Linha 37
if (strcmp(DName, "Umonth", false) == 0) format(month, 50, ParameterValue);// Linha 38
if (strcmp(DName, "Udia", false) == 0) format(dia, 50, ParameterValue); // Linha 40
if (strcmp(DName, "Uhoras", false) == 0) format(horas, 50, ParameterValue); // Linha 41
if (strcmp(DName, "Uminutos", false) == 0) format(minutos, 50, ParameterValue); // Linha 42
if (strcmp(DName, "Usegundos", false) == 0)format(segundos, 50, ParameterValue); // Linha 43
return true; // Linha 44
}// Linha 45
forward SalveHours(playerid); // Linha 46
public SalveHours(playerid) // Linha 47
{ // Linha 48
new ano,month[12],dia,horas,minutos,segundos, mes[13]; // Linha 49
getdate(ano, month, dia); // Linha 50
gettime(horas,minutos,segundos); // Linha 51
if(month == 1) mes = "01"; // Linha 52
else if(month == 2) mes = "02"; // Linha 53
else if(month == 3) mes = "03"; // Linha 54
else if(month == 4) mes = "04"; // Linha 55
else if(month == 5) mes = "05"; // Linha 56
else if(month == 6) mes = "06"; // Linha 57
else if(month == 7) mes = "07";
else if(month == 8) mes = "08";
else if(month == 9) mes = "09";
else if(month == 10) mes = "10";
else if(month == 11) mes = "11";
else if(month == 12) mes = "12";
PFile = fopen(file, io_write);
format(file, sizeof(file), "/ServerData/Players/%s", DName);
if (!fexist(file))
{
format(LineForFile, 100, "Uano %i\r\n", 0);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "Umonth %i\r\n", 0);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "Udia %i\r\n", 0);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "Uhoras %i\r\n", 0);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "Uminutos %i\r\n", 0);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "Usegundos %i\r\n", 0);
fwrite(PFile, LineForFile);
}
else
{
format(LineForFile, 100, "Uano %i\r\n", ano);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "Umonth %i\r\n", month);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "Udia %i\r\n", dia);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "Uhoras %i\r\n", horas);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "Uminutos %i\r\n", minutos);
fwrite(PFile, LineForFile);
format(LineForFile, 100, "Usegundos %i\r\n", segundos);
fwrite(PFile, LineForFile);
}
return true;
}
stock ContasInativas()
{
#define Possiveis_Palavras 50
new string[128];
format(file, sizeof(file), "/ServerData/Players/%s", DName);
for(new x = 0; x <= Possiveis_Palavras; x++)
{
format(string, sizeof(string), "/ServerData/Players/%s%s%s%s%s%s%s%s%s%s", random(127), random(127)
,random(127), random(127), random(127), random(127), random(127), random(127), random(127), random(127)
,random(127), random(127), random(127), random(127), random(127), random(127), random(127), random(127)
,random(127), random(127), random(127), random(127));
if (fexist(string))
{
getdate(ano, month, dia);
if(fwrite(File,"Udia") 6 < || dia > 6)
{
fremove(file);
}
}
return true;
}
Queria que isso checasse se o player nao loga a 12 dias mas seila nao e bem assim que eu fiz kkkkk
pawn Код:
if (fexist(string))
{
getdate(ano, month, dia);
if(fwrite(File,"Udia") 6 < || dia > 6)
{
fremove(file);
}
}