22.03.2014, 01:05
(
Последний раз редактировалось Private200; 22.03.2014 в 01:05.
Причина: False error line (so I would remind and not mess up with the code) was present
)
So I had problem with creating file but I figured it out (Thanks to Jakku). Well, now the problem is on the counting. I want it to count up, but for some reasons it will always count to 1.
This is the code I got.
Thanks in advance.
This is the code I got.
pawn Код:
COMMAND:createconvoy(playerid, params[])
{
new string[64], text[128], number[25];
new File:convoys = fopen("ConvoyIDs.txt", io_read);
if(convoys)
{
fread(convoys, string);
format(number, sizeof(number), "%d", fread(convoys, string)+1);
fwrite(convoys, number);
PlayerInfo[playerid][pConvoy] = fread(convoys, string)+1;
fclose(convoys);
format(text, sizeof(text), "Convoy with ID %d has been created", fread(convoys, string)+1);
print(text);
}
return 1;
}