Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //scr_txt_read
- //read from text file with random number
- exedir=working_directory;
- puzzlefile=string(irandom_range(1,2)) + ".txt";
- puzzledir=string(exedir)+"\puzzle\"+string(puzzlefile);
- puzzleopen = file_text_open_read(puzzledir);
- //setting initial line for array_read
- vblock = 1
- hblock = 1
- //
- do
- {global.array_read[vblock]=file_text_read_real(puzzleopen)
- vblock +=1
- file_text_readln(puzzleopen);
- } until(file_text_eof(puzzleopen));
- file_text_close(puzzleopen);
- vblock = 1
- do {
- global.array_grid[hblock,vblock] = string_char_at(hblock,global.array_read[vblock])
- vblock +=1
- hblock +=1
- } until hblock=9 and vblock=9 {}
Advertisement
Add Comment
Please, Sign In to add comment