File Problem
#1

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
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)