Guardar nombre en .txt
#1

Bueno estoy haciendo esta funcion pero no me guarda el nombre

pawn Код:
new File:log = fopen("Postulados.txt", io_write); // Open the file
if(log)
{
fwrite(log, "Postulado: %s\r\n",NombreJ(playerid)); // Write to the file (\r\n is for a new line)
fclose(log); // Close the file
}
Me guarda en el archivo

Код:
Postulado : %s
En ves de %s deberia decir el nombre.
Reply
#2

pawn Код:
format(variable,sizeof(variable),"Postulados %s",NombreJ(playerid));
fwrite(log,variable);
Reply
#3

Y para que lo lea seria haci?

pawn Код:
CMD:postulados(playerid, params[])
{
new string[64]; // Create the string to store the read text in
new File:example = fopen("Postulados.txt", io_read); // Open the file
    while(fread(example, string)) //reads the file line-by-line
    {
   
    }
    fclose(example);
    return 1;
    }
ї?
Reply
#4

Quote:
Originally Posted by Daniel_Ruiz
Посмотреть сообщение
Y para que lo lea seria haci?

pawn Код:
CMD:postulados(playerid, params[])
{
new string[64]; // Create the string to store the read text in
new File:example = fopen("Postulados.txt", io_read); // Open the file
    while(fread(example, string)) //reads the file line-by-line
    {
   
    }
    fclose(example);
    return 1;
    }
ї?
Si...
Reply
#5

No el que hice no me sirve
Reply
#6

usa dini
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)