Lots of double posts...
I'm trying to get this to display my sprite as a thick sprite, now it works but it still keeps breaking my main code
Code: "secondary sprite
"secondary sprite
{1,2,3,4}→⌊AAX2
{4,3,2,1}→⌊AAY2
1→⌊AAOPS(4)
If ⌊AAX2(1)≠0 and ⌊AAY2(1)≠0
Then
If ⌊AAOPS(4)=1
Then
Plot1(Scatter,⌊AAX2,⌊AAY2,•
Else
Plot1(Scatter,⌊AAX2,⌊AAY2,·
End
End
DispGraph
Pause
Why does this not work? I assume it has to do with my nested If statements. Also, this keeps breaking my program. Right now I have it blocked in a While 0 loop, but if I take it out of the loop then my code just refuses to work at all. I've done some bug testing (putting Disp "enter number here" in strategic locations) and the program is still running through everything, it's just ignoring my commands for some reason.
Here's my entire code (with the secondary sprite code in a While 0 loop which is on line 185 and marked with ######)
Code: ClrHome
Disp " AAIONIA","v.1 Gamma release 2","","Loading...
FnOff
ClrDraw
DetectAsymOff
BackgroundOff
15→C
0→K
2→T
.5→X
.5→Y
"End!→Str1
SetUpEditor ⌊AACDX,⌊AACDY,⌊AAOPS,⌊AAX1,⌊AAY1,⌊AAX2,⌊AAY2,⌊AAJNK
"pen X and Y lists
1→dim(⌊AACDX
1→dim(⌊AACDY
"1 is pen color(not functioning), 2 is secondary sprite color (not functioning), 3 is pen thickness, 4 is second sprite thickness, 5 is AATEST compression/ stretch
10→dim(⌊AAOPS
1→dim(⌊AAX1
1→dim(⌊AAY1
1→dim(⌊AAX2
1→dim(⌊AAY2
1→dim(⌊AAJNK
If ⌊AAOPS(2)=0
15→⌊AAOPS(2)
0→⌊AAX2(1)
0→⌊AAY2(1)
0→⌊AACDX(1)
0→⌊AACDY(1)
Lbl 00
ClrHome
"note to self: do Window
Menu("AAIONIA setup 1","DRAW!",D1,"Color",C1,"Thickness",T1,"Add sprite",A1,"Adjust window",W1,"Test it!",V1,"QUIT",99
Lbl D1
Menu("DRAW","New",01,"Load and continue",L1,"BACK",00
Lbl L1
Input "Enter X coordinate list:",⌊AAX1
Input "Enter Y coordinate list:",⌊AAY1
Pause "Press ENTER"
Goto 01
Lbl C1
Disp "Not functioning","press enter"
Pause
Goto 00
Menu("COLOR","Pen color",C2,"Secondary sprite",C3,"BACK",00
Lbl C2
Disp "press [2nd]+[stat plot],","press 2 and scroll down","to 'Color:'","change color with ","left/ right arrow keys"
Pause
Disp "then do the same but with Plot3
Pause "Press ENTER"
Goto 99
Lbl C3
Disp "press [2nd]+[stat plot],","press 1 and scroll down","to 'Color:'","change color with ","left/ right arrow keys"
Pause "Press Enter"
Goto 99
Lbl T1
Menu("THICKNESS","Thick (•)",T2,"Fine (·)",T3,"BACK",00
Lbl T2
1→⌊AAOPS(3)
Pause "Success! Press ENTER"
Goto 00
Lbl T3
0→⌊AAOPS(3)
Pause "Success! Press ENTER"
Goto 00
Lbl A1
Disp "Enter lists to load:"
Input "Enter X coordinate list:",⌊AAX2
Input "Enter Y coordinate list:",⌊AAY2
Disp "Enter 1 for • sprite","Enter 0 for · sprite"
Input "Thickness:",A
A→⌊AAOPS(4)
Pause "Success! Press ENTER"
Goto 00
Lbl W1
Menu("Window size","Suggested for thick",W2,"Suggested for thin",W3,"Custom",W4,"Save Current Zoom",W5,"Load Zoom",W6,"BACK",00
Lbl W2
ZStandard
ZSquare
.5→X
.5→Y
Text(10,1,"Sucess!"
Text(25,1,"Currently at standard size,"
Text(40,1,"and square."
Text(55,1,"Press ENTER."
Pause
Goto 00
Lbl W3
ZStandard
ZSquare
Zoom Out
1→X
1→Y
Text(10,1,"Sucess!"
Text(25,1,"Currently at standard size,"
Text(40,1,"square, and zoomed out."
Text(55,1,"Press ENTER."
Pause
Goto 00
Lbl W4
Menu("Custom","Xmin",Z1,"Xmax",Z2","Ymin",Z3,"Ymax",Z4,"BACK",00
Lbl Z1
Disp "Current Xmin:",Xmin
Input "Enter Xmin",Xmin
Goto W4
Lbl Z2
Disp "Current Xmax:",Xmax
Input "Enter Xmax",Xmax
Goto W4
Lbl Z3
Disp "Current Ymin:",Ymin
Input "Enter Ymin",Ymin
Goto W4
Lbl Z4
Disp "Current Ymax:",Ymax
Input "Enter Ymax",Ymax
Goto W4
Lbl W5
Xmin→L₅(1)
Xmax→L₅(2)
Ymin→L₅(3)
Ymax→L₅(4)
Xscl→L₅(5)
Yscl→L₅(6)
X→L₅(7)
Y→L₅(8)
Disp "Sucess!","Zoom has been saved in L₅","Please store L₅ in a new","list to prevent","overwriting","Press enter"
Pause
Menu("Store to new list now?","Yes",99,"No",00
Lbl W6
Input "Load which list? ",L₅
L₅(1)→Xmin
L₅(2)→Xmax
L₅(3)→Ymin
L₅(4)→Ymax
L₅(5)→Xscl
L₅(6)→Yscl
L₅(7)→X
L₅(8)→Y
Pause "Sucess! Press enter"
Goto 00
Lbl V1
prgmAATEST
Goto 00
"--------------------------------
Lbl 01
DispGraph
Text(150,1,"Save Quit DecSpeed IncSpeed Undo
Text(135,1,"Speed: ",X
While K≠45
getKey→K
min(Xmax,max(Xmin,⌊AACDX(1)+Xsum(List(Ans={24,26→⌊AACDX(1)
min(Ymax,max(Ymin,⌊AACDY(1)+Xsum(List(K={34,25→⌊AACDY(1)
While 0
"secondary sprite ################################################
If ⌊AAX2(1)≠0 and ⌊AAY2(1)≠0
Then
If ⌊AAOPS(4)=1
Then
Plot1(Scatter,⌊AAX2,⌊AAY2,•
Else
Plot1(Scatter,⌊AAX2,⌊AAY2,·
End
End
"prim sprite
If ⌊AAOPS(3)=1
Then
Plot2(Scatter,⌊AAX1,⌊AAY1,•
Else
Plot2(Scatter,⌊AAX1,⌊AAY1,·
End
"Pen
If ⌊AAOPS(3)=1
Then
Plot3(Scatter,⌊AACDX,⌊AACDY,•
Else
Plot3(Scatter,⌊AACDX,⌊AACDY,·
End
"5 buttons 11 save, 12 quit, 13 decSpeed, 14 inc speed, 15 undo
If K=11
Goto S1
If K=12
Goto E1
If K=13
Then
.05+X→X
.05+Y→Y
Text(135,1,"Speed: ",X
End
If K=14
Then
X+.05→X
Y+.05→Y
Text(135,1,"Speed: ",X
End
If K=15
Then
If dim(⌊AAX1)>1
Then
List(cumSum(⌊AAX1)-⌊AAX1→⌊AAX1
List(cumSum(⌊AAY1)-⌊AAY1→⌊AAY1
Else
2→T
End
End
"must be here to disp correctly
If max(K={13,15,21,24,25,26,34,105
Then
DispGraph
Text(150,1,"Save Quit DecSpeed IncSpeed Undo
Text(135,1,"Speed: ",X
End
"Saving feature
If K=21 or K=105
Then
augment(⌊AAX1,⌊AACDX→⌊AAX1
augment(⌊AAY1,⌊AACDY→⌊AAY1
1+T→T
If T=10
Then
0→T
⌊AAX1→L₃
⌊AAY1→L₄
Text(10,1,"Autosaved to L₃ & L₄
1+T→T
End
If T=1
Then
List(cumSum(⌊AAX1))→⌊AAX1
List(cumSum(⌊AAY1))→⌊AAY1
End
End
End
Goto 99
Lbl E1
Menu("Quit without saving?","Save",S1,"Quit without saving",99,"BACK",01
Lbl S1
Menu("Save?","Save and continue",S2,"Save and quit",S3,"BACK",01
Lbl S2
⌊AAX1→L₁
⌊AAY1→L₂
dim(⌊AAX1→L
Disp "Your X coordinates have","been stored in L₁","Your Y coordinates have","been stored in L₂","Length is in var L","Press Enter"
Pause
Goto 01
Lbl S3
⌊AAX1→L₁
⌊AAY1→L₂
dim(⌊AAX1→L
Disp "Your X coordinates have","been stored in L₁","Your Y coordinates have","been stored in L₂","Length is in var L","Please store these","coordinates in a new list","as L₁ & L₂ will be","overwritten."
Lbl 99
DelVar ⌊AACDX
DelVar ⌊AACDY
DelVar ⌊AAX1
DelVar ⌊AAY1
DelVar ⌊AAX2
DelVar ⌊AAY2
DelVar X
DelVar Y
AxesOn
PlotsOff
FnOn
"End!
I fixed it! now just a few more little things an I'll upload it to the Archives!