Computer Science Canada oh man.. High Scores eh? |
Author: | santabruzer [ Thu Jan 08, 2004 9:37 pm ] |
Post subject: | oh man.. High Scores eh? |
well.. i'm almost done my ISU.. now all i need is a high scores that will write to a file.. now... i'm not sure what will be the most effiecient way to do this.. through arrays and a file is what i thought.. but the problem is finding where is the username, and where is the score.. so i kinda need a bit of help on the file aspect of it.. so retrieving, writing... |
Author: | DanShadow [ Fri Jan 09, 2004 3:21 pm ] | ||
Post subject: | |||
Its actually really easy, use this:
|
Author: | santabruzer [ Fri Jan 09, 2004 8:40 pm ] |
Post subject: | |
yea.. i know about that... or i figure that out from the textbook today at school... thanx anyways.. and dude.. how would you go upon reading the spaces as well.. let's say the text file is in the format: Name (can be anything with spaces) Score (here the score is) basically i want to fill all let's say unknown number of words into the Name, and the Score to be read... |
Author: | McKenzie [ Fri Jan 09, 2004 8:49 pm ] | ||
Post subject: | |||
Good call on the format. That is probably the easiest way to do it. I would suggest using text files rather than binary files. Would look something like:
I'm sure from here you can figure out how to save you data. |
Author: | santabruzer [ Fri Jan 09, 2004 8:50 pm ] |
Post subject: | |
ah.. you can do a tolken on a get from the file.. i thought you couldn't |