Date: Sun, 2 Apr 2000 10:59:46 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: beyonddeath cc: djgpp AT delorie DOT com Subject: Re: File errors but where! In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 30 Mar 2000, beyonddeath wrote: > I am using some code that will work somtimes less times than not, > anyway when it does chances are you cant continue in the game anyway, > the problem is that you save or load and dos gives you a big error > that just says invalid page fault and a lotta numbers. The DJGPP FAQ explains in sections 9.3 and 12.2 how to make sense out of these lotta numbers. > void dosave() > { > fptr = fopen("save.dat", "w+"); > fseek(fptr, 0L, SEEK_SET); > fwrite(&player , sizeof(player), 1, fptr); > fwrite(&days, size2, 1,fptr); Here's your problem: you are writing binary information into the file, but you didn't open the file in binary mode. See section 9.4 of the FAQ for more details.