čau učím sa teraz ukládat cez file.inc a mam taky problem keď zapišem niečo do suboru a chcem to cez format načitať, tak to nejde.
tu mam ukládanie cez dialog inputtext.
if(dialogid == 9951)
{
if(response == 1)
{
new File:subor = fopen("subor.txt", io_write);
if (subor)
{
fwrite(subor, inputtext);
fclose(subor);
}
}
else if(response == 0)
{
}
}
toto ešte ide ale ak chcem načitať to čo som zapisal cez toto:
if(dialogid == 9952)
{
if(response == 1)
{
if(listitem == 0)
{
new File:subor = fopen("subor.txt", io_read);
new string[128];
new ab;
fread(subor, string);
format(ab, sizeof(ab), "Napisal si: %s %s", string, fgetchar(subor, false));
SendClientMessage(playerid, 1, ab);
fclose(subor);
}
}
}
tak mi vyhodi tieto chyby.
: error 035: argument type mismatch (argument 1)
: error 035: argument type mismatch (argument 1)
Chyba je v format(ab, sizeof(ab), "Napisal si: %s %s", string, fgetchar(subor, false));