Jump to content

  • Log In with Google      Sign In   
  • Create Account


High Scores in Lingo....HOW!?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 ChristopherJ   Members   -  Reputation: 122

Like
0Likes
Like

Posted 03 December 2004 - 04:34 AM

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

Sponsor:

#2 ChristopherJ   Members   -  Reputation: 122

Like
0Likes
Like

Posted 03 December 2004 - 05:40 AM

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

#3 hplus0603   Moderators   -  Reputation: 5164

Like
0Likes
Like

Posted 03 December 2004 - 05:45 AM

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...




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS