XJS{RP@-\z=X ( @ (//(  0/80@0?/8 0( ?G@POWOXOP?H0@/7@O_``h_hPX 0(P_oppxow_g@O/8'' 7p`o?G/7 0??H/8`/o?GOX@H0?/pOW?H/8 7OP?G/7( P0@PX@O0@ 0O @H/@' 00@@P0?'_OP@H( 7/7' ^^^^^^^^^^^^^^^^^^^^^^^^^^TeeBBBBeTT^^^^^^^eBDJ33333JJDBeZ^^^^TD33==#####==3JDBT^^^^eJ=###=3DeZ^^TB3# #=3JBZ^^T3#  #=JBT^^J# Sll #=JBZ^T# %,68??86,/@A*< ##45('.6787-9%:;*<=#$+&,--.,/01)2 3 $%&&'%($!)* ##  !"#     ??Catscratches ProductionsdCsO~@object0 [ //Welcome to this example about file handling! I will try to guide you //as good as I can and help you through the learning of file handling. //File handling can be very useful, maybe you don't want to use the large //game_save() function just to save the value of a single variable. //Then file handling comes in handy. //This example will show how to use text file handling file=file_text_open_write("hello.txt") //First we need to open the file, in this case, we open it for writing //We open the file hello.txt, if it doesn't exist, we create it (this is //done automatically, no need to worry) //This returns an id for later use that we save in the variable file //IMPORTANT! When doing things with the file afterwards, use the id! NOT //the filename!!!! //I've got thousands of questions about this and it's really annoying. file_text_write_string(file, "Hello?") //now we write a string to the file, notice that we used the id! //now the file should contain: //Hello? file_text_write_string(file, "Are you there?") //we write another string but oops! See what we got now! //Hello?Are you there? //You can see that there are no new line between the different lines //No separation at all! But what now if we wanted a newline? file_text_writeln(file) //this function solves the problem, it simply adds a new line to the file //so that we will start at next line next time we write a string or real value file_text_write_string(file, "No, not at all!") //you should know what this function does by now //The content should be: //Hello?Are you there? //No, not at all! file_text_close(file) //never forget to close the file after use //but just writing to files is not very useful, then you can't find out what //you just wrote file=file_text_open_read("hello.txt") //now we open the same file for reading instead, notice that the function //still returns an id that needs to be stored content=file_text_read_string(file) //now we read a line from the file and store it in content //but to read the next line, it's not just using this function again, first //we need to jump down a row, by using this function file_text_readln(file) content+="#" //also, we want to jump down a line in our variable, this is done by adding //an # to it content+=file_text_read_string(file) //now we read the rest of the file file_text_close(file) //again, never forget to close show_message(content) //now we can show the content of the file game_end() //let's end the game since there's nothing more to do in it0000000room0        XGame InformationX{\rtf1\ansi\ansicpg1252\deff0\deflang1053{\fonttbl{\f0\fnil Arial;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\cf1\f0\fs24 \par } SpritesSounds BackgroundsPathsScripts Fonts Time LinesObjectsobject0Roomsroom0 Game Information Global Game Settings