Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / help with saving a highscore

Author
Message
army
20
Years of Service
User Offline
Joined: 2nd Feb 2004
Location:
Posted: 2nd Feb 2004 22:46
Im making my first game at the moment and Im trying to find a way to save the highscore for the next time it is played. I have it so that it refreshes ingame but once I shut it down it goes back to default setting. I have tried creating a separate file to save the highscore but im not really sure what im doing there and so it didnt work. Can anyone help, thanks.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 2nd Feb 2004 23:35
Try something like this, substituting your own highscore variable



For free Plug-ins, source and the DBPro Interface library for Visual C++ 6 and .NET
http://www.matrix1.demon.co.uk
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 3rd Feb 2004 00:04
how do you create the .dat file?

just code
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Feb 2004 00:12 Edited at: 3rd Feb 2004 00:12
The code will create it if it doesn't already exist.

For free Plug-ins, source and the DBPro Interface library for Visual C++ 6 and .NET
http://www.matrix1.demon.co.uk
army
20
Years of Service
User Offline
Joined: 2nd Feb 2004
Location:
Posted: 3rd Feb 2004 13:27
thanks Ian it worked perfectly.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Feb 2004 14:24
Of course it did ... I wrote it

For free Plug-ins, source and the DBPro Interface library for Visual C++ 6 and .NET
http://www.matrix1.demon.co.uk
Surreal Studio IanG
21
Years of Service
User Offline
Joined: 21st Sep 2003
Location: Cyberspace...I think
Posted: 3rd Feb 2004 19:19
now now ian - no one should trust their ciode that much, especially when using DBPro(DBPro has more bugs in it than a dodgy holiday camp)

please do not think im taking the p*ss out of the TGC software or out of the moderators, because i like it here and i dont want to get blocked

Flick that switch...*BANG*...Not that one!
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 4th Feb 2004 20:29
how many highscore will this hold and how do you get the highscoreto appear in a message box?

just code
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Feb 2004 20:34
It currently only holds one. If you want more then you will need to modify it to use an array.

Message box? Write one. This could be something as simple as using the BOX/LINE commands to draw your box, and then displaying the score using the TEXT command

For free Plug-ins, source and the DBPro Interface library for Visual C++ 6 and .NET
http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2024-11-26 03:27:37
Your offset time is: 2024-11-26 03:27:37