Ok as I mentioned, I've been working on a new trivia game, which I think is optimized fairly well. It uses 4 programs that link together (which was VERY irritating to start). My question is: Can you only execute the same program from another one once? Example prgmTEST1 has executeprgmTEST2 (or whatever) in it. It runs prgm 2, then goes back to 1. When it goes to that line again, it doesn't work. So I have everything working except the actual loop. The loop is 2 programs, one of which is the actual displayer. The 2nd one just feeds the info at the beginning of each new question. If you need to see the programs, I'll post em. Thanks!
|
We're glad you came by, but you might find what you're looking for elsewhere. TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it. Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope. |
no that shouldn't be happening, you can call a program as may times as you want. (Provided the subprogram ends and you go back to the original code). could you post the problem code?
I might suggest putting a pause right before you call the subprogram to see if its really getting to the spot you think it is.
And if that still works, your subprogram might not be doing what you expect it to.
Execute XPEditor first.
PROGRAM:XPEDITOR
If N=1:Goto A
ClrHome
0→N
0→θ
0→S
0→V
0→P
0→H
prgmXPTRIVIA
Lbl A
prgmXPDEFULT
Lbl B
prgmXPTVLOOPPROGRAM:XPTRIVIA
If S=0
prgmXPDEFULT
0→V
ClrDraw
ClrHome
AxesOff
FnOff
Text(25,32,"LOADING...
For(A,10,80
For(B,25,31
Pxl-Change(B,A
End
End
Text(15,35,"LOADED!
Pause
Lbl SK
ClrHome
Output(1,3,"--SETTINGS--
Output(2,1,"GAMEPACK:
Output(3,5,Str1
Output(4,1,"TIME:
Output(4,13,T
Output(5,1,"QUESTIONS:
Output(5,14,Q
Output(6,1,"DIFFICULTY:
Output(7,4,Str7
Pause
ClrHome
1→θ
1→S
prgmXPTVLOOPPROGRAM:XPDEFULT
If θ=1:Goto 1
If θ=2:Goto 2
If θ=3:Goto 3
If θ=4:Goto 4
If θ=5:Goto 5
If θ=6:Goto 6
If θ=7:Goto 7
If θ=8:Goto 8
If θ=9:Goto 9
If θ=10:Goto 10
If θ=11:Goto 11
If θ=12:Goto 12
If θ=13:Goto 13
If θ=14:Goto 14
If θ=15:Goto 15
If θ=16:Goto 16
If θ=17:Goto 17
If θ=18:Goto 18
If θ=19:Goto 19
If θ=20:Goto 20
If θ>20:Goto X
If S=0:Then
"prgmXPDEFULT"→Str1
"EASY"→Str7
1500→T
20→Q
-1→S
End
Lbl 1
1→U
1→P
"WHAT IS 8*7?"→Str2
"65"→Str3
"56"→Str4
"48"→Str5
2→N
Goto Z
Lbl 2
2→U
2→P
"WHAT IS √( OF 289?"→Str2
"15"→Str3
"18"→Str4
"17"→Str5
3→N
Goto Z
Lbl 3
3→U
1→P
"WHAT CONTINENT IS INDONEIA IN?"→Str1
"ASIA"→Str2
"EUROPE"→Str3
"AFRICA"→Str4
1→N
Goto Z
Lbl 4
4→U
2→P
"SPELL THE PAST FORM OF SLIDE"→Str1
"SLID"→Str2
"SLUD"→Str3
"SLIDED"→Str4
1→N
Goto Z
Lbl 5
5→U
4→P
"WHY ARE THERE SEASONS?"→Str1
"THE EARTH GETS CLOSER TO THE SUN"→Str2
"ROTATION OF THE EARTH"→Str3
"TILT OF THE EARTH"→Str4
3→N
Goto Z
More crap goes here later
Lbl ZPROGRAM:XPTVLOOP
If θ=1:Then
prgmXPDEFULT
End
999→S
ClrHome
Output(2,5,"QUESTION
Output(4,1,"/----* *----/
Output(4,8,U
Output(6,3,"POINTS:
Output(6,11,P
Pause
ClrHome
Output(1,1,Str2
Output(3,1,"A)
Output(5,1,"B)
Output(7,1,"C)
Output(3,3,Str3
Output(5,3,Str4
Output(7,3,Str5
For(Z,0,T
End
Lbl R
ClrHome
0→V
Input "WHAT IS ANSWER :",Str6
If Str6="A"
1→V
If Str6="B"
2→V
If Str6="C"
3→V
θ+1→θ
If V=0:Goto R
If V=N:Then
Output(4,5,"CORRECT!
P+H→H
End
If V≠N
Output(4,5,"NOPE...
Output(6,3,"SCORE:
Output(6,10,H
Pause
If θ>Q:Then
ClrHome
Output(2,4,"GAME OVER.
Output(4,4,"SCORE:
Output(4,12,H
Stop
EndIt should go
Editor → Trivia → Defult (i know it's spelled wrong) → TVloop → Defult → Tvloop etc. etc.
I go through the trouble of making them separate programs so people can add their own sets of questions by making their own program and changing the settings.
By the way 0/ is Alpha, 3
It goes to Question 2, finishes it, then stops.
lol
alright, so when i said post the problem code, i only meant the little bit of code that wasn't working.
what isn't working right in this?
It goes to question 2, asks it, does everything for that Q, then ends the program.
I didn't know the problem, so I posted everything :D
by question 1 you mean what is 8*7, right?
and question 2 is What Ii ð( OF 289, right?
and by the way..
the loading looks like it is just for show… is this true?
1) Yeah if you want i'll explain variables
2) Loading is for show. Had to have some kind of lame intro. :)
loading for show?!?!
shame on you!
at least make the user wait for something usefull!
what is the purpose of N and what is it for?
Is the value 1 by any chance? because that might screw you up.
By the way 0/ is Alpha, 3
That character is θ. You can find it in the character bar, as well as the rest of the calculator characters.
(By the way, I edited your post with the program code and replaced the characters with the equivalent calculator characters.)
Ok me=dumb :D
Just needed a loop, I didn't understand calling other programs and I thought it started the program over and whatever.
Any trivia questions would be appreciated, they will be included in the release.
Well, is it just general trivia, or are you doing Earth Science trivia? I know a bit about computers, so I could give a bunch of Q&As on them.
General Trivia, but if you want to make your own pack, feel free. Needs to have between 10-50 questions (20 recommended). 3 multiple choice answers. I'll add them to the pack/new pack and add the syntax.
Just a thought, that probably sounds a little rude, so sorry about that, but why don't you use StudyCards for it? You can create your own stacks, and it uses less space - the creator can be found here. I know you've done a lot of work, so I can understand that you may not want to, but it's an idea.
