11.04.2009, 20:59
pawn Код:
new File:Cweed;
new string[4];
new string2[4];
Cweed = fopen("Drugs/cweed.txt", io_read);
fread(Cweed,string);
fclose(Cweed);
Cweed = fopen("Drugs/cweed.txt", io_write);
format(string2, sizeof(string2),"%d",(strval(string)+500)); // here something must be wrong !
fwrite(Cweed,string2);
fclose(Cweed);
return 1;
The idea of what i did was:
Read some number from the file, and then add 500 to that number.
The problem is that, it simply crashes the server.
I bet there is something wrong with 'strval' at the the 'format(); //' line.
All help will be appreciated.
Luxeon