You need to use set to assign a value to SongDuration. Try this: set SongDuration = GetRandomInt(MinDuration, MaxDuration)
set SongDuration = GetRandomInt(MinDuration, MaxDuration)