fwrite issue
#2

try this:

pawn Код:
new fname[100]; // Tip: Don't use 100, because i think a filename will never be bigger then 100 chars.
format(fname,100,"/Houses/%i.cfg",hid);
new File:hfile = fopen(fname,io_write);
fclose(hfile)
hfile = fopen(fname,io_append);
new FileInfo[3][100]; // You had this wrong, You got 100x string of 3 chars and it must be 3x string of 100 chars
format(FileInfo[0],100,"Unowned \n"); fwrite(hfile,FileInfo[0]); // Must be FileInfo[0]
format(FileInfo[1],100,"IconX=%f\r\n",hx); fwrite(hfile,FileInfo[1]); // Must be FileInfo[1]
format(FileInfo[2],100,"IconY=%f\r\n",hy); fwrite(hfile,FileInfo[2]); // Must be FileInfo[2]
format(FileInfo[3],100,"IconZ=%f\r\n",hz); fwrite(hfile,FileInfo[3]); // Must be FileInfo[3]
fclose(hfile);
Here, Comments are in the script. This script will work, i think.

Warning: Not compiled or tested
Reply


Messages In This Thread
fwrite issue - by Paladin - 10.09.2009, 19:21
Re: fwrite issue - by [nl]daplayer - 10.09.2009, 19:25
Re: fwrite issue - by Paladin - 10.09.2009, 19:27
Re: fwrite issue - by [nl]daplayer - 12.09.2009, 08:09

Forum Jump:


Users browsing this thread: 1 Guest(s)