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.

DarkBASIC Discussion / High score

Author
Message
learner
16
Years of Service
User Offline
Joined: 7th Mar 2009
Location:
Posted: 7th Mar 2009 23:34
Whats the easiest way of saving and loading a high score?.

Thanks
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 8th Mar 2009 01:44
depends on if you are save simple just numbers or names and numbers or names, scores, and dates and times lol if its just scores then you can use a array and just use save array.


wait do you know how to use arrays(i didn't till i had db for like 6 months lol)

if you are going to save names and dates then you are probabley stil going to using arrays but just sepparate arrays and not save array but open to write and write string and stuff like that. i could right up a example if you want?
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 8th Mar 2009 08:28
This was actually asked a few days ago. I still stick with using the SAVE ARRAY command and just save all of the high scores into one file at once.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 8th Mar 2009 17:51
ya im with BN2, save everything into an array with seperate dimmensions for the score, names, dates, etc
learner
16
Years of Service
User Offline
Joined: 7th Mar 2009
Location:
Posted: 8th Mar 2009 21:44
Thanks for the replies.
No i have`nt got to arrays yet.
I`ve written a program in which you have to translate words to help to learn a different language.
It has a two player mode,where you can compete against each other.
I want the high score saver for the single player mode,to give a bit of incentive to use it.
The saver needs to save the name and score of the user.
A example would be great.

Thank again
Yodaman Jer
User Banned
Posted: 8th Mar 2009 21:50
Indeed. Do as they say. They are smart programmers!



Check out my programming blog!
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 9th Mar 2009 02:49
hahaha just wondering bn2 how would one array hold scores and names?


oh wait str$() hahaha i'm dumb sorry
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 9th Mar 2009 21:23
str$() and val()

or you could do two arrays, it would probably be a little neater with less room for error like so:

DIM Scores(10)
DIM Name$(10)

Note that I used NAME$() rather than NAMES$() mostly because I always mess up with s's next to $'s. Always forget one or the other, but it is all preference.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 10th Mar 2009 17:38
Off topic:

Just read your quote bn2 thats awesome lol

Login to post a reply

Server time is: 2025-06-08 01:01:15
Your offset time is: 2025-06-08 01:01:15