fread function
#1

This is doing my head in, I haven't used files for a while, as I find a MySQL database a lot more convenient and organised, but today I decided I would try it for another project. I went to the wiki and looked at the file tutorial, understood it etcetera, and when I try to execute the example code, this is my output:

[21:35:59] яюh

This is the code

pawn Код:
new filestring[256]; // Create the string to store the read text in
new File:example = fopen("text.cfg", io_read); // Open the file
fread(example, filestring); // Fread from the file and store what's read in 'string'
printf("%s", filestring); // Print what was read
fclose(example); // Close the file
Anyone got any ideas?
Reply


Messages In This Thread
fread function - by Franjdea - 03.03.2011, 20:35
Re: fread function - by JaTochNietDan - 03.03.2011, 20:53
Re: fread function - by Franjdea - 03.03.2011, 21:00
Re: fread function - by JaTochNietDan - 03.03.2011, 21:06
Re: fread function - by Franjdea - 03.03.2011, 21:08
Re: fread function - by Antonio [G-RP] - 03.03.2011, 21:36
Re: fread function - by Lorrden - 03.03.2011, 21:41
Re: fread function - by Antonio [G-RP] - 03.03.2011, 21:43

Forum Jump:


Users browsing this thread: 1 Guest(s)