High Scores in Lingo....HOW!?

Started by
1 comment, last by hplus0603 19 years, 5 months ago
Hello All, First of all...sorry if this is in the wrong forum. I have just finished a game in Macromedia Director using Lingo and I really want to add a high score to the end. How do I do this? Do I have to use FileI/O?? Any help or links to tutorials would be much appreciated as I cannot find how to do this anywhere...and i have spent ages looking!! Regards Chris
Advertisement
Having looked around this forum now I have found some help although it all seems way to complicated.

All i want is a simple top 5 list and that outputs to a text file then ammends it each time.

This is for a university assignment and I dont have to go to indepth to other languages than lingo to get the grade. It would just be nice to put a high score table in.

There must be a simple way of doing this rather than going into ASP, C++ languages etc etc.

I literally need something that will take me an hour to implement.

Hope this is possible....(bet theres not such a thing as a simple high score table)

Thanks again
I don't know Lingo at all.

However, if Lingo supports file I/O, i e reading and writing files, then you need a few functions:

1) a function which takes a list of five (name,score) pairs, and writes them to a file of a given name (say, "hiscores.dat")
2) a function which reads a file of a given name (say, "hiscores.dat") and returns a list of five (name,score) pairs.
3) a function which, when given a (name,score) pair, reads the existing file if it exists, adds the sixth name,score pair, sorts the list, drops the last item, and then writes the file again.

As for how file I/O actually works (how to read/write "hiscores.dat") I'd suggest looking in the Lingo help files. I know that file I/O is probably curtailed, as Shockwave is possible to be executed from the web...
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement