File Functions + String Functions
#1

Код:
        new string[255];
	new String[255];
	new File:example = fopen("input.txt", io_writeread);
	fwrite(example, "I just wrote here");
	fread(example, string);
	fclose(example);
	
	new File:example2 = fopen("output.txt", io_write);
	new stringLength = strlen(string);
        strmid(String,string,0,stringLength / 2);
	fwrite(example2,String);
	fclose(example2);
i want to write half of the sentence:
I just wrote here >> I just
Reply
#2

This isn't working? What exactly happens? Also, your string arrays are large. Do you really need 254 characters?
Reply
#3

Quote:
Originally Posted by LarzI
Посмотреть сообщение
This isn't working? What exactly happens? Also, your string arrays are large. Do you really need 254 characters?
input - "I just wrote here ` `O 8 h ׀"
output - " " (Empty)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)