Setting multiple variables
Author |
Message |
Blade
|
Posted: Sat Mar 15, 2003 4:44 am Post subject: Setting multiple variables |
|
|
hi,
in my program, when i want to play again, i need to reset all my variables back to 0, or their original state i declared them in
as an example, i would declare
code: |
var num1,num2,num3,num4:int:=0
|
but during the game, they would get different values... instead of putting
code: |
num1:=0
num2:=0
num3:=0 ...
|
how can i reset them all to their original state? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Blade
|
Posted: Sat Mar 15, 2003 5:31 am Post subject: (No subject) |
|
|
nevermind, sorry guys, i was just reading up on arrays, i never realized how useful they were |
|
|
|
|
|
azndragon
|
Posted: Sat Mar 15, 2003 9:10 am Post subject: (No subject) |
|
|
Yeah, they are. Before I used arrays, I had to manually code the item structure, and I had 50 items, so that's 50 variables! But now, I can easily code about 120 items, thanks to arrays |
|
|
|
|
|
Tony
|
Posted: Sat Mar 15, 2003 1:39 pm Post subject: (No subject) |
|
|
ohh... I'm good took me a while to type up that tutorial too.
glad that arrays are soo useful 8) |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
|
|