25.11.2016, 07:49
Any clues ?
print(temp) shows the right string, fwrite returns something (so it actually writes something) but the file is empty
print(temp) shows the right string, fwrite returns something (so it actually writes something) but the file is empty
PHP код:
main()
{
new File:handle = fopen("playerclass.txt", io_read);
new buffer[128], temp[80], File:cpos = fopen("createpos.txt", io_append), rest[48], Float:x, Float:y, Float:z, Float:a;
if(handle)
{
while(fread(handle, buffer))
{
sscanf(buffer, "'AddPlayerClass(240,'p<,>ffffs[48]", x, y, z, a, rest);
format(temp, sizeof(temp), "CreatePos(%.4f, %.4f, %.4f, %.4f);\n", x, y, z, a);
fwrite(cpos, temp);
}
}
}