Help with randomization of numbers

hey im having help with randomization…
i have a number that i would like to randomize a number when im on a certain frame. The number i would like is between 10 and 50. i tryed adding this code to my main frame but im getting errors etc.

 function randomise () {
_root.number=random(<10,>50)
randomise(_root.number); }

so heres the code on the main frame… not sure what to change as i tryed doing this through the glossary