new fname[100];
format(fname,100,"/Houses/%i.cfg",hid);
new File:hfile = fopen(fname,io_write);
fclose(hfile);
hfile = fopen(fname,io_append);
new FileInfo[100][3];
format(FileInfo[0],100,"Unowned \n"); fwrite(hfile,FileInfo[1]);
format(FileInfo[1],100,"IconX=%f\r\n",hx); fwrite(hfile,FileInfo[2]);
format(FileInfo[2],100,"IconY=%f\r\n",hy); fwrite(hfile,FileInfo[3]);
format(FileInfo[3],100,"IconZ=%f\r\n",hz); fwrite(hfile,FileInfo[4]);
fclose(hfile);
wned nX=-2521.163574 nY=-623.503662 nZ=132.772262 |
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);