SA-MP Forums Archive
File Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: File Problem (/showthread.php?tid=112679)



File Problem - MB@ - 09.12.2009

Hello

I'm making a register/login script but i have some file problems

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  new Name[MAX_PLAYER_NAME], s[128];
    format(s, sizeof(s),"Accounts/%s.txt",Name);

    if(dialogid == 1)
    {
      if(response == 1)
      {
            fopen(s, io_append);
            fwrite(s, inputtext);  //{LINE 56}  
            fclose(s);  //{LINE 57}
        }
        return 1;
    }
    return 0;
}
If i do this then i get these erors.

pawn Код:
C:\Documents and Settings\Administrator\Desktop\Stunt World Parts\AdminScript\AdminScript.pwn(56) : error 035: argument type mismatch (argument 1)
C:\Documents and Settings\Administrator\Desktop\Stunt World Parts\AdminScript\AdminScript.pwn(57) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Please help


Re: File Problem - Finn - 09.12.2009

pawn Код:
new File:file = fopen(s, io_append);
fwrite(file, inputtext);
fclose(file);
Read wiki, before ask next time.