06.11.2011, 10:35
(
Последний раз редактировалось Jakku; 13.11.2011 в 18:47.
)
I have a strange issue. I just got a new host (Linux). Everything works except my property saving function, which is:
And what is strange, on Windows (localhost) it works great. When I upload ALL property system regarded FILES to Linux server and use the function = server crash.
I also tried debugging:
Log output:
So fwrite crashes it.
Any solutions?
Regards
pawn Код:
stock SaveProperties()
{
new entry[256];
new File: propfile = fopen("PropertySystem/PropertyInfo.txt", io_write);
for(new id; id<PropertiesAmount; id++)
{
format(entry, sizeof(entry), "%s,%.2f,%.2f,%.2f,%d,%d,%s,%d,%d,%d \r\n",PropInfo[id][PropName], PropInfo[id][PropX], PropInfo[id][PropY], PropInfo[id][PropZ], PropInfo[id][PropValue], PropInfo[id][PropEarning], PropInfo[id][PropOwner], PropInfo[id][PropIsBought], PropInfo[id][PropUnbuyableTime], PropInfo[id][Type]);
fwrite(propfile, entry);
}
fclose(propfile);
}
And what is strange, on Windows (localhost) it works great. When I upload ALL property system regarded FILES to Linux server and use the function = server crash.
I also tried debugging:
pawn Код:
stock SaveProperties()
{
print("P1");
new entry[256];
print("P2");
new File: propfile = fopen("PropertySystem/PropertyInfo.txt", io_write);
print("P3");
for(new id; id<PropertiesAmount; id++)
{
print("P4");
format(entry, sizeof(entry), "%s,%.2f,%.2f,%.2f,%d,%d,%s,%d,%d,%d \r\n",PropInfo[id][PropName], PropInfo[id][PropX], PropInfo[id][PropY], PropInfo[id][PropZ], PropInfo[id][PropValue], PropInfo[id][PropEarning], PropInfo[id][PropOwner], PropInfo[id][PropIsBought], PropInfo[id][PropUnbuyableTime], PropInfo[id][Type]);
print("P5");
fwrite(propfile, entry);
print("P6");
}
fclose(propfile);
print("P7");
}
Код:
[12:28:21] P1 [12:28:21] P2 [12:28:21] P3 [12:28:21] P4 [12:28:21] P5
Any solutions?
Regards