Link to home
Start Free TrialLog in
Avatar of luthar
luthar

asked on

? worth +4 pts (SaveSetting/Ini)

Hello,

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?
Avatar of luthar
luthar

ASKER

I will add more points as soon as my friend signs up (in the nxt 24 hr :D )
ASKER CERTIFIED SOLUTION
Avatar of SiM99
SiM99

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of luthar

ASKER

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?
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.
Avatar of luthar

ASKER

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...
Avatar of luthar

ASKER

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 :)