Re: Can someone help
- Posted by Tom Harris <tom.harris at blueyonder.co.uk> Nov 24, 2001
- 421 views
This is a multi-part message in MIME format. ------=_NextPart_000_0017_01C174C2.235A9160 charset="iso-8859-1" woops! here it is. ----- Original Message ----- From: <pampeano at ROCKETMAIL.COM> To: "EUforum" <EUforum at topica.com> 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. > > ------=_NextPart_000_0017_01C174C2.235A9160 Content-Type: application/octet-stream; name="tomsquiz.ex" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="tomsquiz.ex" --TOM'S QUIZ is made by Tom Harris of HOCUS POCUS --HOCUS POCUS gAmEs include get.e include graphics.e include file.e include machine.e integer i integer q sequence name sequence highscore bk_color(WHITE) text_color(BLUE) allow_break(1) --The questions begin clear_screen() puts(1, "What is the name of the current royal family?\n") puts(1, "a. Tudor b.Windsor c.Stuart d.Elizabeth\n") i =3D wait_key() if i !=3D 'b' and i !=3D 'B' then if i =3D 'q' then clear_screen() puts(1, "Thankyou for playing!/n") abort(0) end if puts(1, "Sorry, that's the wrong answer!\n") abort(0) end if =20 clear_screen() -- here we go again! puts(1, "In what year did England win the world cup?\n") puts(1, "a. 1996 b.1986 c.1976 d.1966\n") i =3D wait_key() if i !=3D 'd' and i !=3D 'D' then if i =3D 'q' then clear_screen() puts(1, "Thankyou for playing!/n") abort(0) end if puts(1, "Sorry, that's the wrong answer!\n") abort(0) end if clear_screen() puts(1, "When did Steve Redgrave win his first gold medal?\n") puts(1, "a. 2000 b. 1992 c. 1984 d. 1996\n") i =3D wait_key() if i !=3D 'c' and i !=3D 'C' then if i =3D 'q' then clear_screen() puts(1, "Thankyou for playing!/n") abort(0) end if puts(1, "Sorry, that's the wrong answer!\n") abort(0) end if =20 clear_screen() puts(1, "How many times has cyclist Miguel Indurain won the 'Tour de = France'\n") puts(1, "a. 2 b. 3 c. 4 d. 5\n") i =3D wait_key() if i !=3D 'D' and i !=3D 'd' then if i =3D 'q' then clear_screen() puts(1, "Thankyou for playing!/n") abort(0) end if puts(1, "Sorry, that's the wrong answer!\n") abort(0) end if =20 clear_screen() =20 integer file_num constant ERROR =3D 2 file_num =3D open("highscore.txt", "u") if file_num =3D -1 then puts(ERROR, "couldn't open highscore\n") end if highscore =3D highscore.txt name =3D prompt_string("Please enter your name :") printf(highscore, "%s", {name}) abort(0) ------=_NextPart_000_0017_01C174C2.235A9160--