I'm trying to to read from a TXT file and do some calculation and write it back to another TXT file but when I read the character it changes to ASCII number (ex : '1' convert to 50) and when I try to write it in another file it's the ASCII number. How can I change it to that character I want?
int wf=FileOpen("wf.txt",FILE_WRITE|FILE_ANSI|FILE_TXT);
int rf=FileOpen("rf.txt",FILE_READ|FILE_ANSI|FILE_TXT);
str_size=FileReadInteger(rf,INT_VALUE); //the TXT I read is 1234
str=FileReadString(rf,str_size);
StringToCharArray(str,data1,0,StringLen(str));
RandonNum[0]= str[1];
RandonNum[1]= str[2];
RandonNum[2]= str[3];
FileWrite(wf,str[1],str[2],str[3]); //the TXT I write is 505152