|
-
Sep 29th, 2003, 02:56 PM
#1
Thread Starter
New Member
Adding High Score to my black Jack! Need help PLZE
I have made a Black Jack program, i need to make a highscore for it. My plan is to use wordpad because I understand how to pull text and stuff like that off it, also i know how to put data into it.
First, can I pull data from wordpad like a # and make it a integer?
'I want the score to be in order. using ints, i can do if then... statements. so what i am mainly trying to do is. :
The user hits exit, if user has a "High Score" then let user type in his name through a textbox, save user name and his score (into wordpad), then display higscore by retreiving all the data off of word pad, user then looks at high score then leaves my Program.
I know how i could make a high score through another form that is premade and has highscores,
The reason for wordpad is that it will save the data there so evan if they turn off there comp, the next time they get on they are still a "High Score user" and there name and score will be there because i saved it into data!
Any help is good i am still a (noob ..) and thank you to all who take time and help me out Thx agian, Seth
-
Sep 29th, 2003, 05:39 PM
#2
Try looking into the SaveSetting and GetSetting functions. They save data to the registry (cleaner than files). If you need help, there are plenty of topics on them here on the forums.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Sep 29th, 2003, 06:02 PM
#3
-
Sep 30th, 2003, 01:22 AM
#4
Thread Starter
New Member
...........?
Ok, so if i used that style, (registry stuff) how would i make a list of ten ppl with scores and have it in order! then if you played my game and beat all the high scores that you become the high score! so it stays in order. and boots the last guy off.
...........What would be the vb code : ?
thx again Seth,
-
Sep 30th, 2003, 07:03 AM
#5
Just save it in plain text....thats the easiest way for you. Just make a file, open it up and read the lines that should be something like:
Mark 1002
Tom 876
and so on.
Read them into an array. If you make a strukt of type String and Int then you can look at the int part to calculate if anyone has beaten any of the records. Then you can put the new score into that place, and move the others down....
-
Sep 30th, 2003, 08:13 AM
#6
Frenzied Member
or you could make it binary....which will make it harder to fake.
-
Sep 30th, 2003, 08:41 AM
#7
Or you could encrypt it or use steganografi... ....I don't think that is the point here....
-
Sep 30th, 2003, 02:23 PM
#8
Thread Starter
New Member
Okay i made a wordpad file called "score"
open "U:/black jack/score" for input as #1 'This is how i will open my file. (To read the wordpad)
AND
open "U:/black jack/score" for output as #1 'This is how i will put data into wordpad.
Please review above information to make sure it is true!
so lets say i have a list of ten people,
mark 100
sally 97
ect....
What is the code i should use to pull the names off wordpad and there score. then let the player of my game put in his score, change info in the wordpad so it is in order
(example)
mark 100
sally 97
ect....
lets say i get a score of 98. then i type in my name then it displays in order!
mark 100
Seth 98*****
sally 97
ect....
there will only be a list of ten so i will need to boot off the 10th player on the highscore to make room for the new high score. (if that made sense)
thx agian, Seth
GL HF DD
-
Sep 30th, 2003, 06:55 PM
#9
While I personally would still use the registry, you can try a bubble sort (search for 'bubble sort' and you should get about a trillion results on these forums). If you include all eleven in the bubble sort and only save the top ten, that should solve all your problems.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|