Re: Can someone help

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Tom,
   There's a thing I've to correct two things in your sources and a
question I have to make to you.
   First, when you use printf, first parameter should be file_num
because it's the file handler you got when you opened the file.
   Second, taken from open() reference in the manual "Files opened for
read or update must already exist." You should open it for append, with
the "a" attribute.
   The question is why are you asigning highscore = highscore.txt,
maybe you wanted to do highscore = "highscore.txt" but anyway, it's a
wasted variable, it doesn't do anything on your code.

Best Regards,
    Guillermo BonvehĂ­
    AKA: KNiXEUR

PS: After deleting the variable highscore, updating the printf's first
parameter and using "a" in open() it worked right. Except a thing, if
you use the dos interpreter, it only handles DOS's file format (8
characters and 3 for the extention). There's a library that handles
longer files names in DOS 7 but I don't remember the name.

--- Tom Harris <tom.harris at blueyonder.co.uk> wrote:
> 
> woops! here it is.
> ----- Original Message -----
> From: <pampeano at ROCKETMAIL.COM>
> To: "EUforum" <EUforum at topica.com>
> Sent: Saturday, November 24, 2001 1:56 AM
> Subject: Re: Can someone help
> 
> 
> No file attached =(
> 
> Best Regards,
>     Guillermo BonvehĂ­
>     AKA: KNiXEUR
> 
> --- Tom Harris <tom.harris at blueyonder.co.uk> wrote:
> >
> > I want to save the of the name of the player at the end of the quiz
> > in a file called highscore.txt but when I try to I can't.  Please
> > help!
> >
> > Thanks!
> >
> > Tom Harris.
> >
> > P.S: I have attached the file
> > P.P.S: The answers to the questions go b, d, c, d.
> >
> >
> 
> 
> 

> ATTACHMENT part 2 application/octet-stream name=tomsquiz.ex



=====
Best Regards,
    Guillermo Bonvehi
    AKA: Knixeur - Caballero Rojo

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu