Ich habe hier ein Bug in meinem Script:
Das hier soll eine Variable in eine Datei schreiben, tut aber aber nicht:
forward SaveFrakGuns();
public SaveFrakGuns()
{
for(new i = 0; i < MAX_FRAKS; i++)
{
format(string, sizeof(string), "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",frakguns[i][0],frakguns[i][1],frakguns[i][2],frakguns[i][3],frakguns[i][4],frakguns[i][5],frakguns[i][6],frakguns[i][7],frakguns[i][8],frakguns[i][9],frakguns[i][10]);
format(filestring, sizeof(filestring), "wtsys/guns_frak_%d.ini", i);
file = fopen(filestring, io_write);
fwrite(file, string);
fclose(file);
}
return 1;
}
forward LoadFrakGuns();
public LoadFrakGuns()
{
new arrCords[11][64];
new strFromFile2[256];
for(new i = 0; i < MAX_FRAKS; i++)
{
format(filestring, sizeof(filestring), "wtsys/guns_frak_%d.ini", i);
file = fopen(filestring, io_write);
if (file)
{
fread(file, strFromFile2);
split(strFromFile2, arrCords, ',');
frakguns[i][0] = strval(arrCords[0]);
frakguns[i][1] = strval(arrCords[1]);
frakguns[i][2] = strval(arrCords[2]);
frakguns[i][3] = strval(arrCords[3]);
frakguns[i][4] = strval(arrCords[4]);
frakguns[i][5] = strval(arrCords[5]);
frakguns[i][6] = strval(arrCords[6]);
frakguns[i][7] = strval(arrCords[7]);
frakguns[i][8] = strval(arrCords[8]);
frakguns[i][9] = strval(arrCords[9]);
frakguns[i][10] = strval(arrCords[10]);
fclose(file);
}
}
Hoffe habe alles reinkopiert, wie gesagt, speichert nicht ?!?
Auch unter OnFilterScriptInit & OnFilterScriptExit eingetragen, dateien erstellt aber steht nichts drinne
Mfg,
[ALS]Tion