Computer Science Canada Hi, a little help |
Author: | TomatoFire [ Wed Apr 07, 2004 8:21 pm ] |
Post subject: | Hi, a little help |
Hi, I am new to Turing and found this site through the help tab in turing. Im in grade 10 and just started Turing last week. Anyways I require a bit of assistance. I am starting my first game and was wondering if someone could help me make a high scores list. I want to make it so that theres a command to save a score to a text document. Example: put "Would you like to add your score to the high scores list?" put "Press 1 to save score and 2 to play again" getch (yesorno) if yesorno = "1" then add name, " " ,score to last line of scores.txt end if etc.. btw: I'm just doing this at home for fun |
Author: | jonos [ Wed Apr 07, 2004 9:08 pm ] |
Post subject: | |
http://www.compsci.ca/v2/viewtopic.php?t=5 Take a look at that tutorial by Dan, its a good tutorial but if you have trouble, just post again. |
Author: | Tony [ Wed Apr 07, 2004 9:51 pm ] |
Post subject: | |
eh, its really easy if you keep just one score. You compare if new one is higher then one in file and if so replace. Otherwise you'd have to use a sorting algorythm to sort the scores in order and find where to insert new one and shift all others. |
Author: | limited_skillz [ Wed Apr 07, 2004 10:16 pm ] |
Post subject: | |
read up on record files as well, as they are pretty much made for something like this actually no, if you want that sorted, it could be a ***** if you dont know what your doing well i duno, youll need to learn record files next year anyway, just get a head start |