So what I have here is the code to Snake in the ti 83.
Code:
:ClrHome
:For(A,1,E2
:randInt(1,16)+.1randInt(1,8→C
:Repeat C=Ans(1
:A→dim(⌊A
:⌊A(1
:Output(10fPart(Ans),int(Ans),"O
:Output(10fPart(B),int(B),"   // 1 space
:Output(10fPart(C),int(C),"*
:getKey
:If Ans=45
:Goto 0
:If Ans=34 or 2>abs(Ans-25
:Ans→K
:⌊A(A→B
:⌊A(1)+(K=26)-(K=24)+.1((K=34)-(K=25
:If max(LA=Ans
:Goto 0
:Ans+16(not(int(Ans))-(17=int(Ans)))+.8(not(fPart(Ans))-(.9=fPart(Ans
:augment({Ans},⌊A→A
:End
:augment(Ans,{Ans(A→A
:End
:Lbl 0
:ClrHome
:A

For some reason when I get to the part,***:If max(LA=Ans*** it gives me an error. I have tried converting using other variables (such as K) but it is not working well. I have tried making the L the L for the list variable thinking that it might have been a typo. What is happening with the L.

It gives me wrong data type
You need to use the SetUpEditor found in the STAT menu.
Like this:

Code:
:SetUpEditor A

That will create ʟA found by pressing 2nd, then STAT.
Check this out about BBcode on this website.
The L there is indeed the little list L, hence why it's that weird-shaped L. Wrong data type most likely means you're giving it a scalar (that is, a regular number) instead of a list of numbers. What happened when you tried changing that to list A?
Sure it should say ʟA, else the code would make no sense (L would be interpreted as a real variable, but it is not mentioned anywhere, so that cannot be correct.)
seanlego23 wrote:
You need to use the SetUpEditor found in the STAT menu.
I don't think so. The list is already defined at the very top of the loop.
(For reference, SetUpEditor unarchives a list if given and creates it if not yet existing.)

The Ans variable holds the result from ʟA(1)+(K=26)-(K=24)+.1((K=34)-(K=25 which is a real, ʟA however is a list. So, by doing ʟA=Ans you compare a list to a real - which mismatches data types.
I guess it should say max(ʟA)=Ans, which would take the biggest real from ʟA and compare that to Ans. Not sure, though.
Thanks Nik and seanlego23. It indeed was the small LA
  
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