I don't know whether this is a bug or if bB was programmed this way. I can't do this:

p=(rand/t)*4

Instead, I have to do this:

if t=1 then p=rand/64
it t=2 then p=rand/32

Any thoughts?

I don't understand what you're trying to do, because the lines of code aren't equivalent. Assuming that t will equal either 1 or 2, the first line of code gives you

p=(rand/t)*4

=([a number between 1 and 255]/t)*4

if t=1:

p=([a number between 1 and 255]/1)*4

=[a number between 1 and 255]*4

=[a multiple of 4 between 4 and 252]

if t=2:

p=([a number between 1 and 255]/2)*4

=[a number between 0 and 127]*4

=[a multiple of 4 between 0 and 252]

If the second two lines of code show what you're trying to do, then the first line of code should have been as follows:

p=rand/(64/t)

What exactly are you trying to do? P is supposed to be a random number, but what kind of random number is it supposed to be?

Michael