I know this has been a few months ago, but I have a solution for you:
1. the program seems to be from a TI-83/84, and the commands for the TI-nspire are a wee bit different, so it needs some (not much) rewriting:
input ==> request (or requeststr)
sub( ==> mid(
expr( has a problem with string handling (it thinks "a1" is a variable)
so if you enter "a1" (which btw is not equal to "A1") you need to get what is after the "a" with
mid(str1,2)
and I just added an extra else for the upper/lower case
and a stop if you enter a q (for quit)
the Try Else EndTry is for the other player, if you omit b or have any other character in front of the friend's number.
Local str1,str2,a,b
0→a
0→b
Lbl h
Disp "Me:",a
Disp "Friend",b
RequestStr "Command:",str1
mid(str1,1,1)→str2
- If str2="A" Then
- expr(mid(str1,2))→a
- ElseIf str2="a" Then
- expr(mid(str1,2))→a
- ElseIf str2="q" Then
- Stop
Else
- Try
- expr(str1)→b
- Else
- expr(mid(str1,2))→b
EndTry
EndIf
Goto h