Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
....... a varble name inside of another........
#1
ok i this is how the code is
Code:
for ballnum% = 1 to numberofballs%

         ballx% = INT(RND * 100)
         bally% = INT(RND * 100)

next ballnum%

this is how i wish it could be

Code:
for ballnum% = 1 to numberofballs%

         ballx(ballnum%)% = INT(RND * 100)
         bally(ballnum%)% = INT(RND * 100)

next ballnum%


that way it makes the vables ballx5% or bally316%
you know make it so it put the number right in the varble name

any info would help thanks
ever wish for anything because if you have a wish in one hand and shit in the other what do you have?
Reply
#2
Why not use an array? Smile
: Dj Dennie ::
Reply
#3
Here's how to use an array (in case you don't know):
Code:
dim ballx%(1 to numberofballs%)
dim bally%(1 to numberofballs%)

for ballnum% = 1 to numberofballs%

         ballx%(ballnum%) = INT(RND * 100)
         bally%(ballnum%) = INT(RND * 100)

next ballnum%
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)