Reading A Briefcase error.
#1

Guys I wanted to read the banned folder, and then show me, but when I type the command the server closes on time if anyone knows WHAT could be happening please help me.

PHP код:
//Comando para exibir a lista de banidos.
CMD:banidos(playeridparams[]){
    
Ler("Players_Banidos"playerid); printf("lendo banidos");
    return 
1;

PHP код:
//Stock que faz a leitura
stock Ler(name[], playerid)
{
    new 
nomes[255];
    new 
File:archive;
    
archive fopen(nameio_read);
    while(
fread(archivenomes))
        
SendClientMessage(playerid0xFFFFFFFFnomes);
    
fclose(archive);

Reply
#2

pawn Код:
//Stock que faz a leitura
stock Ler(name[], playerid)
{
    new nomes[255];
    new File:archive;
    archive = fopen(name, io_read);
    while(fread(archive, nomes))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, nomes);
        fclose(archive);
    }
    return 1;
}
Try this.
Reply
#3

@WeponZ

Not work, have another way to read files and send WHAT is in it for you in the message?
Reply
#4

pawn Код:
//Stock que faz a leitura
stock Ler(name[], playerid)
{
    new nomes[255];
    new File:archive;
    archive = fopen(name, io_read);
    while(fread(archive, nomes))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, nomes);
    }
    fclose(archive);
    return 1;
}
Wait try this.
Reply
#5

in will mano, it turns off immediately. of to of using dof2?
Reply
#6

Does the file exist? If you use io_read and the file doesn't exist, it will return a NULL reference.

EDIT:

Also change to this:

pawn Код:
CMD:banidos(playerid, params[]){
    Ler("Players_Banidos.txt", playerid); printf("lendo banidos");
    return 1;
}
Reply
#7

There yes, I checked it first ta everything right the folder with the name and banned inside.
Reply
#8

Make sure the file is a .txt extension.
Reply
#9

Is not .txt, it is a folder inside another folder. :O
Reply
#10

fread can only read files from scriptfiles.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)