Author |
Message |
|
Alex
Newbie
Joined: 25 Feb 2004 Posts: 29
|
Posted: 25 Feb 2004 10:25:47 pm Post subject: |
|
|
Yep, as the title say's im new to TI scripting , and i need some help. I'm making a text based rpg, like where you have a ton of menu's, no grafx like that. (And I only have a TI-83, not plus ) Anyways, as I said im new, and im trying to make a money system, like a string or something, and I think that goes under the LIST section. Once again im new so im probably wrong. Anyways, I need to have a system where you can add money to the stockpile, take out money (like buy things) and see the money. So any help with those scripts would be really appreciated! Thanks!
BTW, i only started scripting on my TI-83 a few weeks ago... and I taught myself the language.. only read a few things in the manual Maybe I should read some more... |
|
Back to top |
|
|
robertak
Member
Joined: 14 Feb 2004 Posts: 125
|
Posted: 25 Feb 2004 10:47:52 pm Post subject: |
|
|
Quote: string or something, and I think that goes under the LIST section A string cannot go under the list section.
Quote: Anyways, I need to have a system where you can add money to the stockpile, take out money (like buy things) and see the money.
You could save the money in a variable, a string or probably the best, a list because it has less chances to get deleted.
L = small L in the catalog
to view a list:
Code: disp LMONEY
to create a list:
Code: {121}->LMONEY
hope this helps |
|
Back to top |
|
|
Alex
Newbie
Joined: 25 Feb 2004 Posts: 29
|
Posted: 25 Feb 2004 10:50:26 pm Post subject: |
|
|
Cool, thanks.. just one more thing, how do you add to the list? |
|
Back to top |
|
|
robertak
Member
Joined: 14 Feb 2004 Posts: 125
|
Posted: 25 Feb 2004 10:52:35 pm Post subject: |
|
|
Add to the money:
Code: LMONEY + LMONEY -> LMONEY
|
|
Back to top |
|
|
Alex
Newbie
Joined: 25 Feb 2004 Posts: 29
|
Posted: 25 Feb 2004 10:55:52 pm Post subject: |
|
|
confoozled! like where do you put in the amount? :/ |
|
Back to top |
|
|
robertak
Member
Joined: 14 Feb 2004 Posts: 125
|
Posted: 25 Feb 2004 10:58:42 pm Post subject: |
|
|
Quote: confoozled! What the?
Quote: like where do you put in the amount? :/ What do you mean? You display LMONEY on the screen. |
|
Back to top |
|
|
Alex
Newbie
Joined: 25 Feb 2004 Posts: 29
|
Posted: 25 Feb 2004 11:00:22 pm Post subject: |
|
|
like to add money to the list..... you said:
LMONEY + LMONEY -> LMONEY
like where do you put the amount that goes into the list....
like 20 or 30....
cause if i just put in LMONEY + LMONEY -> LMONEY it gives me a syntax error |
|
Back to top |
|
|
robertak
Member
Joined: 14 Feb 2004 Posts: 125
|
Posted: 25 Feb 2004 11:01:50 pm Post subject: |
|
|
Code: {0}->LMONEY Change the 0 for the value you want to have. |
|
Back to top |
|
|
Alex
Newbie
Joined: 25 Feb 2004 Posts: 29
|
Posted: 25 Feb 2004 11:05:47 pm Post subject: |
|
|
..... that changes the whole thing to the number i put in like 0.....
doesnt add.. still confused.. oh well im gonna read the section on lists in the manual
Last edited by Guest on 25 Feb 2004 11:06:18 pm; edited 1 time in total |
|
Back to top |
|
|
robertak
Member
Joined: 14 Feb 2004 Posts: 125
|
Posted: 25 Feb 2004 11:09:08 pm Post subject: |
|
|
Here is an example of program:
Code: 1->dim(LMONEY
Lbl 0
Menu("MONEY PROGRAM", "ADD", A1, "WITHDRAW", A2, "VIEW", A3, "EXIT", A4
Lbl A1
Input A
A + LMONEY(1) -> LMONEY(1)
Goto 0
Lbl A2
Input A
LMONEY(1) - A -> LMONEY(1)
Goto 0
Lbl A3
Pause LMONEY
Lbl A4
Stop
Last edited by Guest on 27 Feb 2004 04:55:42 pm; edited 1 time in total |
|
Back to top |
|
|
Alex
Newbie
Joined: 25 Feb 2004 Posts: 29
|
Posted: 25 Feb 2004 11:10:07 pm Post subject: |
|
|
oooooohhhh ok.... thanks, i get it now! |
|
Back to top |
|
|
robertak
Member
Joined: 14 Feb 2004 Posts: 125
|
Posted: 25 Feb 2004 11:12:27 pm Post subject: |
|
|
no problem, glad to here you understand! |
|
Back to top |
|
|
Neostar
Member
Joined: 27 Jun 2003 Posts: 105
|
Posted: 26 Feb 2004 08:36:15 am Post subject: |
|
|
Okay, why use a list? You could just use variables. Like, if it's a store, then say you're selling bananas, then price of bananas could be set and the # of bananas could be variable "B". That's a lot easier, and you could use LRPG for a save file. |
|
Back to top |
|
|
Fr0sty
Member
Joined: 27 Nov 2003 Posts: 202
|
Posted: 26 Feb 2004 02:57:57 pm Post subject: |
|
|
Variables save time in writing the program and execution time, Lists make the deletion of the variables faster. I.e. Deletevar ADeleteVarB...etc OR DeleteVarL1 |
|
Back to top |
|
|
X1011 10100111001
Active Member
Joined: 14 Nov 2003 Posts: 657
|
Posted: 26 Feb 2004 05:11:40 pm Post subject: |
|
|
robertak wrote: Here is an example of program:
Code: 1->dim(LMONEY
Lbl 0
Menu("MONEY PROGRAM", "ADD", A1, "WITHDRAW", A2, "VIEW", A3, "EXIT", A4
Lbl A1
Input A
A + LMONEY -> LMONEY
Goto 0
Lbl A2
Input A
LMONEY - A -> LMONEY
Goto 0
Lbl A3
Pause LMONEY
Lbl A4
Stop
Actually, that would give you an error too. What you have to do is LMoney(1) + amount to add -> LMoney(1) |
|
Back to top |
|
|
Alex
Newbie
Joined: 25 Feb 2004 Posts: 29
|
Posted: 26 Feb 2004 07:38:06 pm Post subject: |
|
|
Thanks everyone! I'm just fooling around with codes in my free time now, i'm about 10% done w/ the game lol. I still don't get one thing. Neo said to use a variable, well how do you set one? Lol I know nothing bout my calc... |
|
Back to top |
|
|
Fr0sty
Member
Joined: 27 Nov 2003 Posts: 202
|
Posted: 26 Feb 2004 08:11:18 pm Post subject: |
|
|
You don't need to set a variable, they're already pre-set (if you got an 83 anyway). Just store your number to your variable and you're set. |
|
Back to top |
|
|
X1011 10100111001
Active Member
Joined: 14 Nov 2003 Posts: 657
|
Posted: 26 Feb 2004 08:17:00 pm Post subject: |
|
|
Well I think he meant how to set it to a different number.
You just put number -> variable (A, B...Z, theta) |
|
Back to top |
|
|
Darth Android DragonOS Dev Team
Bandwidth Hog
Joined: 31 May 2003 Posts: 2104
|
Posted: 26 Feb 2004 10:11:31 pm Post subject: |
|
|
some more about lists
anyting after // is a comment:
{20->LMONEY //20 in the first element
LMONEY(1)+40->LMONEY(1 //add 40 to the first element
40->LMONEY(2 //store 40 in the second element
LMONEY(1)+LMONEY(2->LMONEY(3 //add the first 2 elements and put it in the 3rd element
some things to note:
if you use the 40->LMONEY(number
then number cannot be more than the dimensions (the number of elements) plus 1...
so if i have a list with 11, elements, i could to 3->LMONEY(12
but i couldnt do 46->LMONEY(14
lists can have up to 999 elements
Last edited by Guest on 26 Feb 2004 10:28:50 pm; edited 1 time in total |
|
Back to top |
|
|
Alex
Newbie
Joined: 25 Feb 2004 Posts: 29
|
Posted: 27 Feb 2004 12:06:24 am Post subject: |
|
|
Ok, with
You just put number -> variable (A, B...Z, theta)
how do u add to the variable? |
|
Back to top |
|
|
|