[Filesystem] fwrite shows in file something like 0☺? or j¶ -
KingArthur - 04.03.2009
Hi,
i've got a problem with the filesystem.
Even it wrote in the file, it save something like "0☺?" or "j¶".
...
Why?
Re: [Filesystem] fwrite shows in file something like 0☺? or j¶ -
Marcel - 04.03.2009
Maybe try
pawn Code:
format(file_new_content, sizeof(file_new_content),"%d", file_temp_content);
instead of
pawn Code:
format(file_new_content, sizeof(file_new_content),"%i", file_temp_content);
Re: [Filesystem] fwrite shows in file something like 0☺? or j¶ -
KingArthur - 04.03.2009
Quote:
Originally Posted by Marcel
Maybe try
pawn Code:
format(file_new_content, sizeof(file_new_content),"%d", file_temp_content);
instead of
pawn Code:
format(file_new_content, sizeof(file_new_content),"%i", file_temp_content);
|
Thanks for answer, but it's still the same.
I test it on windows xp (german). Maybe a charset-bug?
Re: [Filesystem] fwrite shows in file something like 0☺? or j¶ -
ICECOLDKILLAK8 - 04.03.2009
What program are you opening the file with?
Re: [Filesystem] fwrite shows in file something like 0☺? or j¶ -
KingArthur - 04.03.2009
Standard MS Editor.
But if i write "print(file_new_content);" it still show the same special chars like in the Editor.
(No, i don't save in the editor.. just open, show, close(without saving)).
Re: [Filesystem] fwrite shows in file something like 0☺? or j¶ -
Finn - 04.03.2009
1. You check with !fexist() that the file DOES NOT exist and then you try to open the file THAT DOES NOT exist? Makes perfect sense.
2. You don't give the mode that you want to open the file with.
3.
READ WIKI, SO YOU MIGHT KNOW HOW TO USE THE FUNCTION NEXT TIME.
PS. Marcel, %d and %i are the same thing.
Re: [Filesystem] fwrite shows in file something like 0☺? or j¶ -
KingArthur - 04.03.2009
Quote:
Originally Posted by Finn
1. You check with !fexist() that the file DOES NOT exist and then you try to open the file THAT DOES NOT exist? Makes perfect sense.
|
That make sence, cause it create a new file
Quote:
Originally Posted by Finn
2. You don't give the mode that you want to open the file with.
|
Not necessary because io_readwrite is defined as default.
Quote:
Originally Posted by Finn
|
I read it

Pls no capslock!
But i fixed it now.
Have to look like this.
...
Re: [Filesystem] fwrite shows in file something like 0☺? or j¶ -
Finn - 04.03.2009
Well, you can ignore the first comment, because I didn't know it will create the file automatically.
If it works, good luck with it. :P
Re: [Filesystem] fwrite shows in file something like 0☺? or j¶ -
KingArthur - 04.03.2009
Quote:
Originally Posted by Finn
because I didn't know it will create the file automatically.
|
But refer to wiki *g*
What ever...thanks for help.
Re: [Filesystem] fwrite shows in file something like 0☺? or j¶ -
Finn - 04.03.2009
What the fuck?
I thought you must define the mode, so because you didn't define it, I thought it's bugged. Then you said readwrite is the default define and I told you to ignore what I said cuz I didn't know it has any default defines. Wiki does not say anything about readwrite being the default define. What is so hard to understand?