SA-MP Forums Archive
Problema con DINI. - 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: Problema con DINI. (/showthread.php?tid=260867)



Problema con DINI. - arturo clark - 11.06.2011

Estaba haciendo un sistema de clanes, y asн es como se guardaban:
pawn Код:
stock GFile(gangid)
{
    new file[128];
    format(file, 128, "Gangs/%d.ini", gangid);
    return file;
}
Despuйs lo cambie a esto:
pawn Код:
stock GFile(gangid)
{
    new file[128];
    format(file, 128, "/Gangs/%d.ini", gangid);
    return file;
}
Pero ya no querнa guardar la informaciуn, asн que lo cambie al primero de nuevo, pero sigue sin funcionar.
їSaben porque pasa esto?


Respuesta: Problema con DINI. - Ari3l - 11.06.2011

que raro, veo todo bien yo xD menos el segundo que lo cambiaste y le pusiste /Gangs/%d.ini y no lleva el "/" al principio

proba haci xD
Код:
stock GFile(gangid)
{
    new file[128];
    format(file, sizeof(file), "Gangs/%s.ini", gangid);
    return file;
}



Respuesta: Problema con DINI. - AlexD1151 - 11.06.2011

pss bueno yo tambien veo el codigo bn que pusiste ( el 1 ) el 2 como dice Ari3l tiene el error del / al principio, revisa otras partes que tenga tu codigo ETC que puede que sea otra cosa que ayas modificado o agregado


Re: Problema con DINI. - arturo clark - 11.06.2011

Pero tambiйn me funcionaba si ponнa el "/". ;|

Y esto que me dijiste Ari3l:
pawn Код:
stock GFile(gangid)
{
    new file[128];
    format(file, sizeof(file), "Gangs/%s.ini", gangid);
    return file;
}
No va a funcionar porque %s es para strings, y yo estoy utilizando %d porque gangid es un numero.


Re : Problema con DINI. - cristab - 11.06.2011

#define GFILE(%0) "Gangs/%0.ini"


Re: Re : Problema con DINI. - Miguel - 11.06.2011

Quote:
Originally Posted by cristab
Посмотреть сообщение
#define GFILE(%0) "Gangs/%0.ini"
Es mejor #define GFile(%0) "Gangs\%0.ini", ya que aveces el "/" no funciona.


Re: Problema con DINI. - arturo clark - 12.06.2011

Gracias Miguel, eso me sirviу. Tambiйn gracias a todos.