Whats wrong with this functions
#1

pawn Код:
stock WriteInlog(name[],str[])
{
    new location[128];
    format(location,sizeof(location),"%s.sav",name);
    if(fexist(location))
    {
        new File:log = fopen(location,io_append);
        fwrite(log,str);
        fclose(log);
    }
    else { printf("Log %s is not found",location);}
    return 1;
}
stock Createlog(name[])
{
    new location[128];
    format(location,sizeof(location),"%s.sav",name);
    new File:log = fopen(location,io_append);
    fclose(log);
    return 1;
}
its writes but only one line how to make it writes every player that has used a command and ban log ect
Reply
#2

bumb sorry for it but i need help
Reply
#3

replace stock with public, might help
remember to forward both of the functions.
Reply
#4

its works but its writes like this cords {1157880709,1151388825,1093476352);cords {1156893723,1151853832,1098251876);cords {1157908540,1151778665,1093476352);
Reply
#5

You're writing an string to the file, but the coords are an float. You should format them into an float and then write that string to the file.
Reply
#6

I know and i fix it i have to add \r\n on the end
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)