Sign in to follow this  
ChristopherJ

High Scores in Lingo....HOW!?

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this