1. another problem
- Posted by Tom Harris <tom.harris at blueyonder.co.uk> Nov 24, 2001
- 396 views
This is a multi-part message in MIME format. ------=_NextPart_000_0021_01C174DF.CE0BE6A0 boundary="----=_NextPart_001_0022_01C174DF.CE0BE6A0" ------=_NextPart_001_0022_01C174DF.CE0BE6A0 charset="iso-8859-1" Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it prints... <whatever the person put as their name> ...instead of a number. There's probably a good reason whyt this happens but being new to Euphoria I haven't spotted it. Thanks! Tom. P.S: I have attatched the program again, to make it work creat a blank file called score.txt ------=_NextPart_001_0022_01C174DF.CE0BE6A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 8bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 5.50.4134.600" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it prints...</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2><whatever the person put as their name></FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>...instead of a number. There's probably a good reason whyt this happens but being new to Euphoria I haven't spotted it.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Thanks!</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Tom.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>P.S: I have attatched the program again, to ------=_NextPart_000_0021_01C174DF.CE0BE6A0 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 a integer q sequence name sequence highscore a =3D 0 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() a =3D a+1 -- 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() a =3D a+1 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() a =3D a+1 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 a =3D a+1 integer file_num constant ERROR =3D 2 file_num =3D open("score.txt", "u") if file_num =3D -1 then puts(ERROR, "couldn't open highscore\n") end if name =3D prompt_string("Please enter your name :") printf(file_num, "%s", {name}) printf(file_num, "%s", {a}) clear_screen() puts(1, "You have been added to the highscore list.\n") abort(0) ------=_NextPart_000_0021_01C174DF.CE0BE6A0--
2. Re: another problem
- Posted by euman at bellsouth.net Nov 24, 2001
- 358 views
This is a multi-part message in MIME format. ------=_NextPart_000_0022_01C174E9.666B6200 charset="iso-8859-1" Your file attachments are NOT comeing thru!!! If the file is less than 50k perhaps you should try again. Euman ----- Original Message ----- From: Tom Harris To: EUforum Sent: Saturday, November 24, 2001 7:01 AM Subject: another problem Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it prints... ------=_NextPart_000_0022_01C174E9.666B6200 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 8bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2600.0" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Your file attachments are NOT comeing thru!!!</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>If the file is less than 50k </FONT><FONT face=Arial size=2>perhaps you should try again.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Euman</FONT> </DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=tom.harris at blueyonder.co.uk href="mailto:tom.harris at blueyonder.co.uk">Tom Harris</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com href="mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, November 24, 2001 7:01 AM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> another problem</DIV> <DIV><FONT face=Arial size=2>Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it
3. Re: another problem
- Posted by Tom Harris <tom.harris at blueyonder.co.uk> Nov 24, 2001
- 379 views
This is a multi-part message in MIME format. ------=_NextPart_000_002C_01C17515.710376E0 boundary="----=_NextPart_001_002D_01C17515.710376E0" ------=_NextPart_001_002D_01C17515.710376E0 charset="iso-8859-1" ok, what about now, is it there? ----- Original Message ----- From: euman at bellsouth.net To: EUforum Sent: Saturday, November 24, 2001 6:10 PM Subject: Re: another problem Your file attachments are NOT comeing thru!!! If the file is less than 50k perhaps you should try again. Euman ----- Original Message ----- From: Tom Harris To: EUforum Sent: Saturday, November 24, 2001 7:01 AM Subject: another problem Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it prints... ------=_NextPart_001_002D_01C17515.710376E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 8bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 5.50.4134.600" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>ok, what about now, is it there?</FONT></DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=euman at bellsouth.net href="mailto:euman at bellsouth.net">euman at bellsouth.net</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com href="mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, November 24, 2001 6:10 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: another problem</DIV> <DIV><FONT face=Arial size=2>Your file attachments are NOT comeing thru!!!</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>If the file is less than 50k </FONT><FONT face=Arial size=2>perhaps you should try again.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Euman</FONT> </DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=tom.harris at blueyonder.co.uk href="mailto:tom.harris at blueyonder.co.uk">Tom Harris</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com href="mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, November 24, 2001 7:01 AM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> another problem</DIV> <DIV><FONT face=Arial size=2>Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it ------=_NextPart_000_002C_01C17515.710376E0 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 a integer q sequence name sequence highscore a =3D 0 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() a =3D a+1 -- 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() a =3D a+1 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() a =3D a+1 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 a =3D a+1 integer file_num constant ERROR =3D 2 file_num =3D open("score.txt", "u") if file_num =3D -1 then puts(ERROR, "couldn't open highscore\n") end if name =3D prompt_string("Please enter your name :") printf(file_num, "%s", {name}) printf(file_num, "%s", {a}) clear_screen() puts(1, "You have been added to the highscore list.\n") abort(0) ------=_NextPart_000_002C_01C17515.710376E0--
4. Re: another problem
- Posted by Tom Harris <tom.harris at blueyonder.co.uk> Nov 24, 2001
- 373 views
This is a multi-part message in MIME format. ------=_NextPart_000_003B_01C17515.E6CDE220 charset="iso-8859-1" arggghhhhhh! Why isn't it working?!?!? ----- Original Message ----- From: Tom Harris To: EUforum Sent: Saturday, November 24, 2001 6:25 PM Subject: Re: another problem ok, what about now, is it there? ----- Original Message ----- From: euman at bellsouth.net To: EUforum Sent: Saturday, November 24, 2001 6:10 PM Subject: Re: another problem Your file attachments are NOT comeing thru!!! If the file is less than 50k perhaps you should try again. Euman ----- Original Message ----- From: Tom Harris To: EUforum Sent: Saturday, November 24, 2001 7:01 AM Subject: another problem Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it ------=_NextPart_000_002C_01C17515.710376E0 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 a integer q sequence name sequence highscore a =3D 0 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() a =3D a+1 -- 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() a =3D a+1 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() a =3D a+1 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 a =3D a+1 integer file_num constant ERROR =3D 2 file_num =3D open("score.txt", "u") if file_num =3D -1 then puts(ERROR, "couldn't open highscore\n") end if name =3D prompt_string("Please enter your name :") printf(file_num, "%s", {name}) printf(file_num, "%s", {a}) clear_screen() puts(1, "You have been added to the highscore list.\n") abort(0) ------=_NextPart_000_002C_01C17515.710376E0-- ------=_NextPart_000_003B_01C17515.E6CDE220 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 8bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 5.50.4134.600" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>arggghhhhhh! Why isn't it working?!?!?</FONT></DIV> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=tom.harris at blueyonder.co.uk href="mailto:tom.harris at blueyonder.co.uk">Tom Harris</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com href="mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, November 24, 2001 6:25 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: another problem</DIV> <DIV><FONT face=Arial size=2>ok, what about now, is it there?</FONT></DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=euman at bellsouth.net href="mailto:euman at bellsouth.net">euman at bellsouth.net</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com href="mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, November 24, 2001 6:10 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: another problem</DIV> <DIV><FONT face=Arial size=2>Your file attachments are NOT comeing thru!!!</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>If the file is less than 50k </FONT><FONT face=Arial size=2>perhaps you should try again.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Euman</FONT> </DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=tom.harris at blueyonder.co.uk href="mailto:tom.harris at blueyonder.co.uk">Tom Harris</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com href="mailto:EUforum at topica.com">EUforum</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, November 24, 2001 7:01 AM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> another problem</DIV> <DIV><FONT face=Arial size=2>Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it ------=_NextPart_000_002C_01C17515.710376E0 Content-Type: application/octet-stream; name="tomsquiz.ex" Content-Transfer-Encoding:
5. Re: another problem
- Posted by euman at bellsouth.net Nov 24, 2001
- 381 views
This is a multi-part message in MIME format. ------=_NextPart_000_0014_01C174EE.7EAD2740 charset="iso-8859-1" Would you zip the program and then send it... For some reason it's not comeing thru right.. ------=_NextPart_000_0014_01C174EE.7EAD2740 charset="iso-8859-1" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2600.0" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Would you zip the program and then send it...</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>For some reason it's not comeing thru right..</FONT></DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"><FONT
6. Re: another problem
- Posted by Igor Kachan <kinz at peterlink.ru> Nov 24, 2001
- 369 views
Hi Tom, >arggghhhhhh! Why isn't it working?!?!? Try to open window with adjustments of your mailer and set *plain text* not *html* and not *mixed*. I have Russian localisation of Internet Mail mailer, so I can not say exactly what buttons are for this work on your Outlook Express. So just click and look for radiobuttons with somewhat similar to *plain text* *html* *mixed* And check *plain text*. Then attach your separate program *file* with *clip for paper* button. Do not copy/paste program text into your output message. Or just copy/paste it into your message, if this program text is short enough, but without any attachments in this case. I think, this info can help. You can send your messages to yourself to see what you get. Regards, Igor Kachan kinz at peterlink.ru
7. Re: another problem
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Nov 24, 2001
- 366 views
Tom, Try using "sprint(WhateverYourScoreVariableIs)", wherever you were putting "WhateverYourScoreVariableIs" into the score file. You'll have to "include misc.e" to use it. ie, include misc.e puts(FileNumberForScoreFile, VariableWithPersonsName & " " & sprint(ThatPersonsScoreVariable)) Dan Moyer ----- Original Message ----- From: "Tom Harris" <tom.harris at blueyonder.co.uk> To: "EUforum" <EUforum at topica.com> Sent: Saturday, November 24, 2001 4:01 AM Subject: another problem Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it prints... <whatever the person put as their name> ...instead of a number. There's probably a good reason whyt this happens but being new to Euphoria I haven't spotted it. Thanks! Tom. P.S: I have attatched the program again, to make it work creat a blank file called score.txt
8. Re: another problem
- Posted by Tom Harris <tom.harris at blueyonder.co.uk> Nov 25, 2001
- 381 views
When I do that I get the error message sprint takes 3 arguments. Tom. ----- Original Message ----- From: "Dan Moyer" <DANIELMOYER at prodigy.net> To: "EUforum" <EUforum at topica.com> Subject: Re: another problem Tom, Try using "sprint(WhateverYourScoreVariableIs)", wherever you were putting "WhateverYourScoreVariableIs" into the score file. You'll have to "include misc.e" to use it. ie, include misc.e puts(FileNumberForScoreFile, VariableWithPersonsName & " " & sprint(ThatPersonsScoreVariable)) Dan Moyer ----- Original Message ----- From: "Tom Harris" <tom.harris at blueyonder.co.uk> To: "EUforum" <EUforum at topica.com> Sent: Saturday, November 24, 2001 4:01 AM Subject: another problem Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it prints... <whatever the person put as their name> ...instead of a number. There's probably a good reason whyt this happens but being new to Euphoria I haven't spotted it. Thanks! Tom. P.S: I have attatched the program again, to make it work creat a blank file called score.txt
9. Re: another problem
- Posted by Tom Harris <tom.harris at blueyonder.co.uk> Nov 25, 2001
- 376 views
wahoo! I've fixed it. what I needed was: printf(file_num, "%15s, %5d\n", {name, score}) Tom Harris. ----- Original Message ----- From: "Dan Moyer" <DANIELMOYER at prodigy.net> To: "EUforum" <EUforum at topica.com> Subject: Re: another problem Tom, Try using "sprint(WhateverYourScoreVariableIs)", wherever you were putting "WhateverYourScoreVariableIs" into the score file. You'll have to "include misc.e" to use it. ie, include misc.e puts(FileNumberForScoreFile, VariableWithPersonsName & " " & sprint(ThatPersonsScoreVariable)) Dan Moyer ----- Original Message ----- From: "Tom Harris" <tom.harris at blueyonder.co.uk> To: "EUforum" <EUforum at topica.com> Sent: Saturday, November 24, 2001 4:01 AM Subject: another problem Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it prints... <whatever the person put as their name> ...instead of a number. There's probably a good reason whyt this happens but being new to Euphoria I haven't spotted it. Thanks! Tom. P.S: I have attatched the program again, to make it work creat a blank file called score.txt
10. Re: another problem
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Nov 25, 2001
- 362 views
Tom, Glad you found a nice solution:) BTW, sprint *doesn't* require 3 arguments, so I'm guessing that however you used it might have generated a message that made it *seem* so? I think I've noticed that sometimes the error messages say things that aren't exactly true. Dan ----- Original Message ----- From: "Tom Harris" <tom.harris at blueyonder.co.uk> To: "EUforum" <EUforum at topica.com> Sent: Sunday, November 25, 2001 1:23 AM Subject: Re: another problem wahoo! I've fixed it. what I needed was: printf(file_num, "%15s, %5d\n", {name, score}) Tom Harris. ----- Original Message ----- From: "Dan Moyer" <DANIELMOYER at prodigy.net> To: "EUforum" <EUforum at topica.com> Sent: Sunday, November 25, 2001 7:30 AM Subject: Re: another problem Tom, Try using "sprint(WhateverYourScoreVariableIs)", wherever you were putting "WhateverYourScoreVariableIs" into the score file. You'll have to "include misc.e" to use it. ie, include misc.e puts(FileNumberForScoreFile, VariableWithPersonsName & " " & sprint(ThatPersonsScoreVariable)) Dan Moyer ----- Original Message ----- From: "Tom Harris" <tom.harris at blueyonder.co.uk> To: "EUforum" <EUforum at topica.com> Sent: Saturday, November 24, 2001 4:01 AM Subject: another problem Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it prints... <whatever the person put as their name> ...instead of a number. There's probably a good reason whyt this happens but being new to Euphoria I haven't spotted it. Thanks! Tom. P.S: I have attatched the program again, to make it work creat a blank file called score.txt
11. Re: another problem
- Posted by euman at bellsouth.net Nov 25, 2001
- 376 views
You might also try the following utility.... ----------------------- -- PRINT.E v1.2 -- -- by Gabriel Boehme -- -- updated 3/28/2000 -- ----------------------- Euman euman at bellsouth.net ----- Original Message ----- From: "Dan Moyer" <DANIELMOYER at prodigy.net> To: "EUforum" <EUforum at topica.com> Sent: Sunday, November 25, 2001 9:50 PM Subject: Re: another problem Tom, Glad you found a nice solution:) BTW, sprint *doesn't* require 3 arguments, so I'm guessing that however you used it might have generated a message that made it *seem* so? I think I've noticed that sometimes the error messages say things that aren't exactly true. Dan ----- Original Message ----- From: "Tom Harris" <tom.harris at blueyonder.co.uk> To: "EUforum" <EUforum at topica.com> Sent: Sunday, November 25, 2001 1:23 AM Subject: Re: another problem wahoo! I've fixed it. what I needed was: printf(file_num, "%15s, %5d\n", {name, score}) Tom Harris. ----- Original Message ----- From: "Dan Moyer" <DANIELMOYER at prodigy.net> To: "EUforum" <EUforum at topica.com> Sent: Sunday, November 25, 2001 7:30 AM Subject: Re: another problem Tom, Try using "sprint(WhateverYourScoreVariableIs)", wherever you were putting "WhateverYourScoreVariableIs" into the score file. You'll have to "include misc.e" to use it. ie, include misc.e puts(FileNumberForScoreFile, VariableWithPersonsName & " " & sprint(ThatPersonsScoreVariable)) Dan Moyer ----- Original Message ----- From: "Tom Harris" <tom.harris at blueyonder.co.uk> To: "EUforum" <EUforum at topica.com> Sent: Saturday, November 24, 2001 4:01 AM Subject: another problem Now I want to add a score. Currently the score (a) should go up by one every time you answer a question correctly but when I look at the file score .txt it prints... <whatever the person put as their name> ...instead of a number. There's probably a good reason whyt this happens but being new to Euphoria I haven't spotted it. Thanks! Tom. P.S: I have attatched the program again, to make it work creat a blank file called score.txt
12. Re: another problem
- Posted by pampeano at ROCKETMAIL.COM Nov 26, 2001
- 386 views
Hi Tom, If you take a look at printf() in the reference manual, you could see the different formats that you can give a variable printed with it. You're giving printf() a parameter %s that indicates that the variable must be printed as if it were a character, try giving %d parameter to print it as a decimal number. Best Regards, Guillermo BonvehĂ AKA: KNiXEUR > ----- Original Message ----- > From: Tom Harris > To: EUforum > Sent: Saturday, November 24, 2001 7:01 AM > Subject: another problem > Now I want to add a score. Currently the score (a) should go > up by one every time you answer a question correctly but when I look > at the file score .txt it ------=_NextPart_000_002C_01C17515.710376E0 > Content-Type: application/octet-stream; name="tomsquiz.ex"