As usual, post your whole code.

We can only guess about the VAR num_of_beacons.

Do you have something like;
Code:
num_of_beacons[0] = $30+BVAR ' BVAR being the number you want to dispaly.