i have missed something.
#1

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;
I have re-checked the code few times, but still i cant find the mistake !

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
Reply


Messages In This Thread
i have missed something. - by luxeon - 11.04.2009, 20:59
Re: i have missed something. - by luxeon - 12.04.2009, 17:26
Re: i have missed something. - by Danut - 12.04.2009, 17:28
Re: i have missed something. - by luxeon - 12.04.2009, 17:32
Re: i have missed something. - by Danut - 12.04.2009, 17:34
Re: i have missed something. - by luxeon - 13.04.2009, 14:14
Re: i have missed something. - by yezizhu - 13.04.2009, 14:45
Re: i have missed something. - by luxeon - 13.04.2009, 15:13
Re: i have missed something. - by pspleo - 13.04.2009, 15:20
Re: i have missed something. - by yezizhu - 13.04.2009, 15:25

Forum Jump:


Users browsing this thread: 1 Guest(s)