beg.webmaster
07-27-2008, 05:42 PM
I'm making a basic 128-bit encryption script in VBS, and the only part that's throwing an error is generating a 128 random number array. Please check my code and see what's wrong. The error I get is
Subscript out of range:'[string:"1"]' on line 7. But I set the array to have 128 values (0-127), and 1 isn't in between those values? Please help
i="0"
do until i="129"
i=i+1
randomDec=(rnd*9)
random=Round(randomDec)
key=array(127)
key(""&i)=random
loop
null1=InputBox("Your key is:","Key",""&key)
Subscript out of range:'[string:"1"]' on line 7. But I set the array to have 128 values (0-127), and 1 isn't in between those values? Please help
i="0"
do until i="129"
i=i+1
randomDec=(rnd*9)
random=Round(randomDec)
key=array(127)
key(""&i)=random
loop
null1=InputBox("Your key is:","Key",""&key)