Computer Science Canada

Setting multiple variables

Author:  Blade [ 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?

Author:  Blade [ Sat Mar 15, 2003 5:31 am ]
Post subject: 

nevermind, sorry guys, i was just reading up on arrays, i never realized how useful they were Wink

Author:  azndragon [ Sat Mar 15, 2003 9:10 am ]
Post 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 Very Happy

Author:  Tony [ Sat Mar 15, 2003 1:39 pm ]
Post subject: 

ohh... I'm good Very Happy took me a while to type up that tutorial too.

glad that arrays are soo useful 8)


: