@Z
From you code snippet, I don't see any consistency with your variables. What I mean is, you reference 1 variable with one name and type (action$ then pitching$) then another. In all the snippets, there just isn't any consistency. A big thing in programming is organization and variable management. In a 10000 line program, if you are calling a variable named act at line 3678, then later trying to call that same variable at line 7500 calling it action, your program will not behave as you want because they are two different variables even though you intended for them to be the same. Now you'd have to debug and it could be pretty hard.
With that being said, I see this in your code:
For n= 1 to 4
Read pitching$(n)
next n
For n=1 to 4
Read pitchingdata$(n)
next n
Text 0,0,"Choose an action:"
Text 0,20,"1.Fastball"
Text 0,40,"2.Slider"
Text 0,60,"3.Changeup"
Text 0,80,"4.Breaking Ball"
set cursor 0,100
input "__";choice
Text 0,140,"Choice "+str$(choice)+" Results in a "+action$(choice)
If pitching$="1" then gosub pitch_one
If pitching$="2" then gosub pitch_two
If pitching$="3" then gosub pitch_three
If pitching$="4" then gosub pitch_four
You've created two STRING arrays (just making sure you mean them to be strings) one called pitching$() and one called pitchingdata$(). So far that's fine, probably. But then after the variable choice is set by a user, you reference action$(choice) - this is probably ok too because you are using action$(choice) to describe what the user has chosen - but if you menat it to describe the pitch - then it won't work becuase you defined pitching$() to hold that info. And to reference pitching$() you would have to use pitching$(choice).
Onward
A little later you have
If pitching$="1" then etc.
Where did pitching$ come from? Do you realize that this is a different variable than your array pitching$() ? Also, if it's meant to be different, you will confuse yourself because it looks like the array.
Did you perhaps mean to send the choice to the pitching$() array? Something like
pitching$(choice)? If so then your IF THEN conditional would make no sense.
I can only guess at your intentions but from the code I see, it's that inconsistency that's making things not work the way you want.
Just a tip, and you probably already know this, but if you want to reference a number, use a number type variable (either an interger or a float) - if you want to reference some text, use a string variable. For example, choice is a number variable. The user will only input 1,2,3 or 4. There's no reason to make it a string unless you want to add it to a line of text. Anyway, the whole point is to ask yourself questions about want you want your variables to do and choose the appropriate one for the situation.
Now back to pitching$ and the IF THEN
As I see it, you are trying to get the users choice and use that to tell what kind of pitch to throw. Remember, the choice the user is making is stored in
choice and you want to use that number to send to the approriate pitch routine. You can use the IF THEN you had set up for pitching$ but replace pitching$ with choice and get rid of the quotes around the numbers
IF choice = 1 then gosub pitch_one
If you are going to have a huge list of choices, I'll throw another concept at you that you should go research in the DB help - use SELECT and CASE.
Select and Case are used to sorta "if then" through a list of many choices. Let's say instead of 4 choices for pitches you had 15. You wouldn't necessarily want to write an IF THEN clause for each choice, you would use SELECT and CASE. Here the variable we are looking at is named choice so we start with
Select choice
Select choice
case 1
gosub pitch_one
endcase
case 2
gosub pitch_two
endcase
etc...
Endselect
The power of Select Case comes when you have a lot of stuff happen if that particular case occurs. You could cram as much code as you want between CASE and ENDCASE essentially making it a subroutine if you are so inclined.
The IF THEN in you situation may be better because it won't necessarily save on typing to use Select Case.
Enjoy your day.