Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Need help keeping high scores
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Tony_200004




PostPosted: Thu Dec 04, 2003 9:50 pm   Post subject: Need help keeping high scores

Hey... i am making a blackjack game for my ISU... my teacher asked me to get a high score system involved in it... i have already got it so money is added just need to know how to save that file... also how do you make is so the program is a .exe.... and one last thing cant post the code because am not taking the chance of them thinking i plagurised... so please help me as best as you can without seeing my code.. thanks
Sponsor
Sponsor
Sponsor
sponsor
poly




PostPosted: Thu Dec 04, 2003 9:54 pm   Post subject: (No subject)

well to make program a .exe just goto RUN in menu than GENERATE STAND-ALONE PROGRAM
Andy




PostPosted: Thu Dec 04, 2003 9:57 pm   Post subject: (No subject)

i'm assuming you already know arrays(read my tutorial on arrays if you dont), so this is the basic concept, at the beginning of the game, you load in the file, and at the end of the game you save it
code:
var fn : int %this is the file ID
open : fn, "scores.txt", get
for i : 1 .. 10
    get : fn, score (i)
end for

close : fn

open : fn, "scores.txt", put
for i : 1 .. 10
    put : fn, score (i)
end for
close:fn
nelson




PostPosted: Thu Dec 04, 2003 10:08 pm   Post subject: asdf

i submitted reversi , go check it out

i used two textfiles for highscore

one for name and one for score ^^

and use the codes the guy wrote above~
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: