Hey everyone. I was wondering how I can encode a file using GE script. To be more specific, I want a bit of code that will open a file and then read each character. For each character it reads, it will add a certain number to it's ID and store the result in an array. So for example, it would take the string "abc" and turn it into "def". See what I mean?
I promise to give points to anyone who can solve the problem. Thank you
Sonic
A tree never hits an automobile except in self-defence.
However, I'm a complete newb when it comes to file Input/Output so could you answer a few questions for me? So even though the code works, I have no clue what all of the functions mean. Could you explain them to me? If I wanted to overwrite the abc.c file, what code should I use? I will have to decode the file as well so what code should I use for that?
A tree never hits an automobile except in self-defence.
here's some additional code for writing to file and an extra function called codeString (which encodes and decodes depending on the id you pass it) each line of code is commented