? worth +4 pts (SaveSetting/Ini)


I'm making a program and i need to save the type of game (Standard/Modify) in a file as well as a Top Score List including Name/Score/Time

I've been trying to create a ini file but it doesn't seem to work...I alos lookep up the "SaveSetting" but it can't return text

Any suggestions?
Who is Participating?
SiM99Connect With a Mentor Commented:
SaveSetting and GetSetting are the VB INI File routines....

If you're not sure how to use them, you can look on www.planet-source-code.com, this has a lot of INI accessing code :)
lutharAuthor Commented:
I will add more points as soon as my friend signs up (in the nxt 24 hr :D )
lutharAuthor Commented:
Thanks for the info but i think i'll go with the Open/Line Input/Close

Looks kind of easyer but is it better then using a ini file?
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Better or not is usually just your own preference. If you find file I/O to be easier than using standard ini access routines, the go for it.
That depends on what you want the user to be able to change in the file.
If your program is something like WinAmp, and you're making a skin setup file.. then the setup file will need to be readable.

This could be done in either file format (ini or your own design), but the INI file is universally understandable, it can be interpreted by most prople who will want to make skins...

If the file will not need to be read/modified by a user, then you're probably better off using the VB commands (Line Input/Output etc.) as this will be less readable and the user will not be as tempted to modify the file.
lutharAuthor Commented:
Ah ok..It's probably the second solution..

Is it possible to know if a file has been modified without using my program? I was thinking about something like a code generated by the program depending on the date/time that would be put in the file and if that file was modified in any other way it would tell me.

Is that possible?
You're right there, you would probably have to use a timestamp or a date/time in some way..

The best one would be to get the file properties (like Windows uses in detail view, or when you right click and select Properties), though I am not sure how this is done..

Arent we straying from the origional question ?

"I've been trying to create a ini file but it doesn't seem to work...I alos lookep up the "SaveSetting" but it can't return text"

I told you about GetSetting, and KDivad and me have gave comments about using files other than INI files..

If you're storing program settings which wont need to be moved, why not use the registry ?
(You can't copy the settings from one computers registry to another computers registry - without knowing exactly what you;re doing :)

A source for any code you'll want is www.planet-source-code.com...
lutharAuthor Commented:
Yup you did give some good advice but i don't see any problems with adding comments to learn a lil bit more...

Anyway since i got the pts I've increased this question to 20pts and giving to you the points :)
No problem, i was just making a note ....

hope you found what you needed on Planet Source Code :)
All Courses

From novice to tech pro — start learning today.