SA-MP Forums Archive
[AYUDA]Crash en linux y no en windows - 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: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [AYUDA]Crash en linux y no en windows (/showthread.php?tid=342139)



[AYUDA]Crash en linux y no en windows - Fluid016 - 12.05.2012

Hola, bueno tengo un problema mi servidor crashea en mi host linux y en mi pc no. Crashea por este codigo

pawn Код:
public GuardarEn(filename[],text[])
{
    new File:Lfile;
    new filepath[256];
    new string[256];
    new year, month, day;
    new hour, minute, second;

    getdate(year, month, day);
    gettime(hour, minute, second);
    format(filepath,sizeof(filepath),"/Logs/%s.txt", filename);
    Lfile = fopen(filepath,io_append);
    format(string,sizeof(string),"[%02d/%02d/%02d | %02d:%02d:%02d] %s\r\n",day,month,year,hour,minute,second, text);
    fwrite(Lfile,string);
    fclose(Lfile);
    return 1;
}
y en mi pc tengo windows y los guarda y no crashea. Espero sus respuestas


Respuesta: [AYUDA]Crash en linux y no en windows - TheChaoz - 14.05.2012

Chequea tener la carpeta "Logs" creada.


Respuesta: [AYUDA]Crash en linux y no en windows - Fluid016 - 14.05.2012

Si claro que esta creada tmb los archivos estan creados. No porq crashea en linux y en windows no es rraro


Respuesta: [AYUDA]Crash en linux y no en windows - TheChaoz - 14.05.2012

Utiliza el el plugin: crashdetect y decinos que te dice.


Respuesta: [AYUDA]Crash en linux y no en windows - Fluid016 - 14.05.2012

Ya lo instale y me salio esto

Код:
[01:30:00] [debug] Server crashed while executing FreeRoam.amx
[01:30:00] [debug] Backtrace (most recent call first):
[01:30:00] [debug] #0  native fclose() from samp-agus
[01:30:00] [debug] #1  0x00001060()+0xa0 from FreeRoam.amx
[01:30:00] [debug] #2  public OnDialogResponse()+0x58470 from FreeRoam.amx



Respuesta: [AYUDA]Crash en linux y no en windows - Jovanny - 14.05.2012

pawn Код:
public GuardarEn(filename[],text[])
{
    new File:Lfile;
    new filepath[256];
    new string[256];
    new year, month, day;
    new hour, minute, second;

    getdate(year, month, day);
    gettime(hour, minute, second);
    format(filepath,sizeof(filepath),"/Logs/%s.txt", filename);
    Lfile = fopen(filepath,io_append);
    if(Lfile)
    {
    format(string,sizeof(string),"[%02d/%02d/%02d | %02d:%02d:%02d] %s\r\n",day,month,year,hour,minute,second, text);
    fwrite(Lfile,string);
    fclose(Lfile);
    }
    return 1;
}