I finished my program and there a 2 problems

1)Err: Arguement resulted in it drags me to this line of code
:Menu("Charge?","+1",P1,"+2",P2,"+3",P3,"+4",P4,"-1",N1,"-2",N2,"-3",N3,"Home",99,"Info",91

2)When I go to another label in the executed program, there is text from the previous label text on top of the current label text
I don't think its my code
Can you please use SourceCoder to post the code from your program in this topic? Remember to copy and paste the full code from the "Forum BBCode (phpBB)" box. The problem with your menu is that you have 9 items in the menu, but since the Menu is 8 lines tall, and the title takes 1 line, you can only have up to seven items in the menu. As far as solving your second problem, it would help to see some code.
I don't think you've shown me how to do that yet
hr088730 wrote:
I don't think you've shown me how to do that yet


1) Go to http://sc.cemetech.net
2) Upload your .8xp file
3) Hit the Parse File button
4) Click the gray downward-pointing arrow next to the name of your program on the next page
5) Scroll down, hit the gray downward-pointing arrow next to "phpBBCode:".
6) Copy the code in that box to a post here
BASIC Code wrote:
:AxesOff
:GridOff
:
:ClrDraw
:
:Lbl 00
:
:Menu("Charge?","+1",P1,"+(-)2",P2,"+(-)3",P3,"+4",P4,"-1",N1,"Home",99,"Info",91
:
:Lbl P1
:Text(1,1,"+1"
:Text(7,1,"Copper(I)--Cu"
:Text(13,1,"**Silver--Ag"
:Text(19,1,"Lithium--Li"
:Text(25,1,"Sodium--Na"
:Text(31,1,"Potassium--K"
:Text(37,1,"Rubidium--Rb"
:Text(43,1,"Cesium--Cs"
:Text(49,1,"** ind. can change
:Text(55,1,"Roman numerals ind. charge
:
:Pause
:Goto 00
:
:Lbl P2
:Text(1,1,"+(-)2"
:Text(7,1,"**Cadmium--Cd"
:Text(13,1,"Chromium(II)--Cr"
:Text(19,1,"Cobalt(II)--Co"
:Text(25,1,"Copper(II)--Cu"
:Text(31,1,"Iron(II)--Fe"
:Text(37,1,"Lead(II)--Pb"
:Text(43,1,"Manganese(II)--Mn"
:Text(49,1,"Mercury(II)--Hg"
:Text(55,1,"More"
:
:Pause
:ClrDraw
:
:Text(1,1,"+(-)2"
:Text(7,1,"Nickel(II)--Ni"
:Text(13,1,"Tin(II)--Sn"
:Text(19,1,"Vanadium(II)--V"
:Text(25,1,"**Zinc--Zn"
:Text(31,1,"Magnesium--Mg"
:Text(37,1,"Calcium--Ca"
:Text(43,1,"Strontium--Sr
:Text(49,1,"Barium--Ba"
:Text(55,1,"More"
:
:Pause
:ClrDraw
:
:Text(1,1,"+(-)2"
:Text(7,1,"Oxide--O"
:Text(13,1,"Sulfide--S"
:Text(1,1,"** indicates charge doesn't"
:Text(7,1,"change"
:Text(13,1,"Roman Numerals indicate"
:Text(19,1,"charge"
:
:Pause
:Goto 00
:
:Lbl P3
:Text(1,1,"+(-)3"
:Text(7,1,"Chromium(III)--Cr"
:Text(13,1,"Iron(III)--Fe"
:Text(19,1,"Lead(III)--Pb"
:Text(25,1,"Vanadium(III)--V"
:Text(31,1,"Aluminum--Al"
:Text(37,1,"-3"
:Text(43,1,"Nitride--N"
:Text(49,1,"Roman Numerals indicate"
:Text(55,1,"charge"
:
:Pause
:Goto 00
:
:Lbl P4
:Text(1,1,"+4"
:Text(7,1,"Lead(IV)--Pb"
:Text(13,1,"Vanadium(IV)--V"
:Text(19,1,"Tin(IV)--Sn"
:Text(25,1,"Roman Numerals indicate"
:Text(31,1,"charge"
:
:Pause
:Goto 00
:
:Lbl N1
:Text(1,1,"-1"
:Text(7,1,"Fluoride--F"
:Text(13,1,"Chloride--Cl"
:Text(19,1,"Bromide--Br"
:Text(25,1,"Iodide--I
:
:Pause
:Goto 00
:
:Lbl 99
:AxesOn
:ClrDraw
:ClrHome
:Output(1,1," "
:Return
:
:Lbl 91
:ClrHome
:Disp "This is only"
:Disp "some common"
:Disp "Monatomic Ions"
:Disp "Use at own risk"
:
:Pause
:Goto 00
:
Generated by SourceCoder, © 2005-2010 Cemetech
Under Lbl P1, P2, ..., N1, you need a ClrDraw. Alternatively, and this is the better option, just switch ClrDraw and Lbl 00. This way, every time you reach Lbl 00, you will ClrDraw and be ready to display text again on a blank screen. Makes sense?
It worked, thanks so much
I just added ClrDraw under everyone of my labels and before the text
hr088730 wrote:
It worked, thanks so much
I just added ClrDraw under everyone of my labels and before the text
No no, that's the unoptimized way to do it. Since you always visit Lbl 00 before any of the other labels, you just need a single ClrDraw under Lbl 00, and then you can omit it at all the other labels.
BASIC Code wrote:
:AxesOff
:GridOff
:
:
:Lbl 00
:ClrDraw
:Menu("Charge?","+1",P1,"+(-)2",P2,"+(-)3",P3,"+4",P4,"-1",N1,"Home",99,"Info",91
:
:Lbl P1
:Text(1,1,"+1"
:Text(7,1,"Copper(I)--Cu"
:Text(13,1,"**Silver--Ag"
:Text(19,1,"Lithium--Li"
:Text(25,1,"Sodium--Na"
:Text(31,1,"Potassium--K"
:Text(37,1,"Rubidium--Rb"
:Text(43,1,"Cesium--Cs"
:Text(49,1,"** ind. can change
:Text(55,1,"Roman numerals ind. charge
:
:Pause
:Goto 00
:
:Lbl P2
:Text(1,1,"+(-)2"
:Text(7,1,"**Cadmium--Cd"
:Text(13,1,"Chromium(II)--Cr"
:Text(19,1,"Cobalt(II)--Co"
:Text(25,1,"Copper(II)--Cu"
:Text(31,1,"Iron(II)--Fe"
:Text(37,1,"Lead(II)--Pb"
:Text(43,1,"Manganese(II)--Mn"
:Text(49,1,"Mercury(II)--Hg"
:Text(55,1,"More"
:
:Pause
:ClrDraw
:
:Text(1,1,"+(-)2"
:Text(7,1,"Nickel(II)--Ni"
:Text(13,1,"Tin(II)--Sn"
:Text(19,1,"Vanadium(II)--V"
:Text(25,1,"**Zinc--Zn"
:Text(31,1,"Magnesium--Mg"
:Text(37,1,"Calcium--Ca"
:Text(43,1,"Strontium--Sr
:Text(49,1,"Barium--Ba"
:Text(55,1,"More"
:
:Pause
:ClrDraw
:
:Text(1,1,"+(-)2"
:Text(7,1,"Oxide--O"
:Text(13,1,"Sulfide--S"
:Text(1,1,"** indicates charge doesn't"
:Text(7,1,"change"
:Text(13,1,"Roman Numerals indicate"
:Text(19,1,"charge"
:
:Pause
:Goto 00
:
:Lbl P3
:Text(1,1,"+(-)3"
:Text(7,1,"Chromium(III)--Cr"
:Text(13,1,"Iron(III)--Fe"
:Text(19,1,"Lead(III)--Pb"
:Text(25,1,"Vanadium(III)--V"
:Text(31,1,"Aluminum--Al"
:Text(37,1,"-3"
:Text(43,1,"Nitride--N"
:Text(49,1,"Roman Numerals indicate"
:Text(55,1,"charge"
:
:Pause
:Goto 00
:
:Lbl P4
:Text(1,1,"+4"
:Text(7,1,"Lead(IV)--Pb"
:Text(13,1,"Vanadium(IV)--V"
:Text(19,1,"Tin(IV)--Sn"
:Text(25,1,"Roman Numerals indicate"
:Text(31,1,"charge"
:
:Pause
:Goto 00
:
:Lbl N1
:Text(1,1,"-1"
:Text(7,1,"Fluoride--F"
:Text(13,1,"Chloride--Cl"
:Text(19,1,"Bromide--Br"
:Text(25,1,"Iodide--I
:
:Pause
:Goto 00
:
:Lbl 99
:AxesOn
:ClrDraw
:ClrHome
:Output(1,1," "
:Return
:
:Lbl 91
:ClrHome
:Disp "This is only"
:Disp "some common"
:Disp "Monatomic Ions"
:Disp "Use at own risk"
:
:Pause
:Goto 00
:
Generated by SourceCoder, © 2005-2010 Cemetech


u mean like that?
Yup, That should definitely do the trick. Am I correct?
yep it did, now to move onto my polyatimic ion program
hr088730 wrote:
yep it did, now to move onto my polyatimic ion program
Sounds good. I don't love the masses of Text() commands; I feel like you could optimize those a bit, but let me not overwhelm you with optimization tips when you just started programming.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement