I don't understand the *p, *c, *f ......pointers in "File routines" documentation. I want to save scores when game is over. Yes, I know I have to do the "PACKFILE* f=pack_fopen("file.fil", F_WRITE_PACKED);" -thing first. And then what ? Score variable in my program is called "hiscore". How to save this hiscore to disk and load it at the beginning of the program. The "file.fil" must exist, right ? How to create it ? I beg you to write me a simple example. Not any explanations. Just hard stuff and working lines.
I won't stop drinking before this problem is solved. Just kidding (really?).
Suomenkielisetkin vastaukset kelpaa. (That's a scream for help in finnish !.)
Please help me, Real Dummy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I solved the problem with the FILE+fread+fwrite combination but some documents says that I should rather use igetl and iputl functions for portabilty. I can't use them. I only get "can't convert FILE to PACKFILE" error or something like that. Why ? Any hints ?
Real Dummy still needs help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Don't worry again, FILE+fread+fwrite is supported in every standard C compiler (is an ANSI feature, so its likely to be in ALL compilers; I never got one without these functions)
Regards,
YF
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't understand the *p, *c, *f ......pointers in "File routines" documentation. I want to save scores when game is over. Yes, I know I have to do the "PACKFILE* f=pack_fopen("file.fil", F_WRITE_PACKED);" -thing first. And then what ? Score variable in my program is called "hiscore". How to save this hiscore to disk and load it at the beginning of the program. The "file.fil" must exist, right ? How to create it ? I beg you to write me a simple example. Not any explanations. Just hard stuff and working lines.
I won't stop drinking before this problem is solved. Just kidding (really?).
Suomenkielisetkin vastaukset kelpaa. (That's a scream for help in finnish !.)
Please help me, Real Dummy
Hello guys !
I solved the problem with the FILE+fread+fwrite combination but some documents says that I should rather use igetl and iputl functions for portabilty. I can't use them. I only get "can't convert FILE to PACKFILE" error or something like that. Why ? Any hints ?
Real Dummy still needs help
Don't worry again, FILE+fread+fwrite is supported in every standard C compiler (is an ANSI feature, so its likely to be in ALL compilers; I never got one without these functions)
Regards,
YF