
-----------------------------------
rossco2004
Wed Jan 19, 2005 11:37 am

help with reading from a file
-----------------------------------
here is the start of my code:

procedure start ()
    drawfillbox (1, 1, maxx, maxy, black)
    picID (1) :=
        Pic.FileNew ("h:/computer science/millionaire/logos/logo.bmp")
    Pic.Draw (picID (1), 1, 25, picCopy)

    Music.PlayFile ("h:/computer science/millionaire/sounds/start.wav")
    Text.Locate (49, 2)
    %Ask user's name
    put "Please enter your name: " ..
    color (yellow)
    get strName : *
    cls
    color (white)
    open : intPlayers, "h:/computer science/millionaire/played.txt", get
    
    close : intPlayers
end start

Now somewhere between the open and close (last couple lines) i need the program to look in that file (played.txt) and see if the name entered above has already been used, and if so it needs to put what their score was onto the screen.


The put part I think I can figure out myself. :wink: 

Thanks

-----------------------------------
Delos
Wed Jan 19, 2005 12:17 pm


-----------------------------------
I'm not going to flame you.

Others might.

You've posted in the wrong forum.  This is, as the title indicates, Turing Tutorials.  A place for you to post if you have a tutorial to give to others.  Not a place to ask for help.
Politely ask a mod to move your thread.
