Why isn't this working?
#1

I'm getting the SendClientMessage... That part is working. But the fwrite(openedfile, str); part won't work. I open the file and there is nothing written there.

PHP код:
    if(dialogid == DIALOG_BUGREPORT)
    {
        if(
response)
        {
            
SendClientMessage(playeridSCMCOLOR"Thank you! Your bug report has been saved for our development team to see.");
            
            new 
name[MAX_PLAYER_NAME], str[280];
            
GetPlayerName(playeridnamesizeof(name));
                
            new 
File:openedfile fopen("feedback.txt"io_append);
                
                
                
            
format(strsizeof(str), "Player Name: %s\n\n"name);
                
            
fwrite(openedfilestr);
            
            return 
1;
                
        }
    } 
Reply
#2

fclose(openedfile); after fwrite
Reply
#3

Why the default IO file system... There are other better alternatives already.

And shouldn't you utilize discord or forum for the bug reports because that's how you can properly manage it. This helps users to not report the same bug/ suggest over without knowing.
Reply
#4

Quote:
Originally Posted by Logic_
Посмотреть сообщение
Why the default IO file system... There are other better alternatives already.

And shouldn't you utilize discord or forum for the bug reports because that's how you can properly manage it. This helps users to not report the same bug/ suggest over without knowing.
I'm just scripting random crap to learn xD What alternatives are there that I can use though?
Reply
#5

Quote:
Originally Posted by Jefff
Посмотреть сообщение
fclose(openedfile); after fwrite
tyvm + repped

Do you also know how I can add a line break to the txt file? I used \n\n but that doesn't work.
Reply
#6

\r\n
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)