Sorry, thought you we're using lite-c not c-script. When using c-script you should use randomize(). Be carefull random(100) does not return random numbers from 0 - 100 but from 0 - 99.999.
Always learn from history, to be sure you make the same mistakes again...