0 Members and 1 Guest are viewing this topic.
Heiligen post-mortem Post, Schlägermann!
Welcome, P2's brother you should make your own forum account! I can't look at the program like this (can't open .8xp programs on my iPad), but Im sure others will be glad to help.
0→Xmin:1→ΔX0→Ymin:1→ΔYClrDrawFnOff :AxesOff:GridOff:Func:CoordOff:LabelOff:ExprOff:Full:Degree:a+bi22→dim(∟SCHL12→B1→∟SCHL1(1):1→∟SCHL1(2)randInt(4,90)→∟SCHL1(21)randInt(4,60)→∟SCHL1(22)While ∟SCHL1(B-1)≠∟SCHL1(21) or ∟SCHL1(B)≠∟SCHL1(22) Pt-Change(∟SCHL1(21),∟SCHL1(22) For(A,2,20,2) Pt-On(round(∟SCHL1(A-1)),round(∟SCHL1(A) End tan-1((∟SCHL1(B-1)-∟SCHL1(B+1-20(B=20)))/(∟SCHL1(B)-∟SCHL1(B+2-20(B=20))))→C tan-1((∟SCHL1(21)-∟SCHL1(B-1))/(∟SCHL1(22)-∟SCHL1(B)))→D If abs(D-C)<20 Then (C+D)/2→E Else (C+40((D-C)>0)-20)→E End If (√((∟SCHL1(21)-∟SCHL1(B-1))2+(∟SCHL1(22)-∟SCHL1(B))2))<5 Then randInt(4,90)→∟SCHL1(21) randInt(4,60)→∟SCHL1(22) End Pt-Off(∟SCHL1(B-3+20(B=2)),∟SCHL1(B-2+20(B=2))) ∟SCHL1(B-1)+cos(E)→∟SCHL1(B-3+20(B=2)) ∟SCHL1(B)+sin((E)→∟SCHL1(B-2+20(B=2)) B-2→B If B=0:20→B Text(1,85,round(C,0 Text(7,85,round(D,0 Text(13,85,round(E,0End
Always initialize all of your variables at the beginning of your program. It seems as if you only initialize B and LSCHL1
0→Xmin:1→ΔX0→Ymin:1→ΔYClrDrawFnOff :AxesOff:GridOff:Func:CoordOff:LabelOff:ExprOff:Full:Degree:a+bi22→dim(∟SCHL12→B1→∟SCHL1(1):1→∟SCHL1(2)randInt(4,90)→∟SCHL1(21)randInt(4,60)→∟SCHL1(22)While ∟SCHL1(B-1)≠∟SCHL1(21) or ∟SCHL1(B)≠∟SCHL1(22) Pt-Change(∟SCHL1(21),∟SCHL1(22) For(A,2,20,2) Pt-On(round(∟SCHL1(A-1)),round(∟SCHL1(A)[b],0[/b] End tan-1((∟SCHL1(B-1)-∟SCHL1(B+1-20(B=20)))/(∟SCHL1(B)-∟SCHL1(B+2-20(B=20))))→C tan-1((∟SCHL1(21)-∟SCHL1(B-1))/(∟SCHL1(22)-∟SCHL1(B)))→D If abs(D-C)<20 Then (C+D)/2→E Else (C+40((D-C)>0)-20)→E End If (√((∟SCHL1(21)-∟SCHL1(B-1))[b]^2[/b]+(∟SCHL1(22)-∟SCHL1(B))2))<5 //It's [b]^2[/b] and not just [b]2[/b] Then randInt(4,90)→∟SCHL1(21) randInt(4,60)→∟SCHL1(22) End Pt-Off(∟SCHL1(B-3+20(B=2)),∟SCHL1(B-2+20(B=2))) ∟SCHL1(B-1)+cos(E)→∟SCHL1(B-3+20(B=2)) ∟SCHL1(B)+sin((E)→∟SCHL1(B-2+20(B=2)) B-2→B If B=0:20→B Text(1,85,round(C,0 Text(7,85,round(D,0 Text(13,85,round(E,0End
:randInt(0,94)→X:randInt(0,62)→Y:randInt(0,94)→V:randInt(0,62)→W:randInt(0,94)→A:randInt(0,62)→B:7→V:31→W:32→T:31→U:11→J:2→n:While 1:Pt-Off(Z,K:Pt-On(V,W:Pt-Off(R,S:Pt-On(X,Y:Pt-Off(C,D:Pt-On(A,B:Line(Z,K,R,S,0:Line(V,W,X,Y:√((X-V)²+(Y-W)²)→θ:√((A-X)²+(B-Y)²)→N:V→Z:W→K:X→R:Y→S:A→C:B→D:::If N≤5:Then:randInt(0,94)→A:randInt(0,62)→B:End:::If J<9:Then:If V>X:V+.5abs(V-X)/θ→V:If V<X:V-.5abs(V-X)/θ→V:If W>Y:W+.5abs(W-Y)/θ→W:If W<Y:W-.5abs(W-Y)/θ→W:End:::If J>10:Then:If V>X:V-.5abs(V-X)/θ→V:If V<X:V+.5abs(V-X)/θ→V:If W>Y:W-.5abs(W-Y)/θ→W:If W<Y:W+.5abs(W-Y)/θ→W::End::If N>5:Then::If X>A:X-.5abs(X-A)/N→X:If X<A:X+.5abs(X-A)/N→X:If Y>B:Y-.5abs(Y-B)/N→Y:If Y<B:Y+.5abs(Y-B)/N→Y::End::::√((V-X)²+(W-Y)²)→J:::End