It all depends on your code. That should work but only in the correct place. What code are you using? There are 1000 ways to do mouselook.
[edit] An example of that working would be.
sync on : sync rate 0
hide mouse : autocam off
make matrix 1,500,500,50,50
make object cube 1, 10
position object 1, 250,50,250
position camera 250,25,250
do
rotate camera camera angle x()+(mousemovey()/2),camera angle y()+(mousemovex()/2),0
cx#=camera angle x() : cy#=camera angle y() : cz#=camera angle z()
if camera angle x()>90 then xrotate camera 90
if camera angle x()<-90 then xrotate camera -90
circle screen width()/2,screen height()/2,8
sync
loop