Code conversion from 4.1.3 to 7.2 version

Hello,

I am new to Monkey C coding. Trying compile old version code to 7.2, Getting errors

for( var result = scanResults.next(); result != null; result = scanResults.next() ) {
            if( contains( result.getServiceUuids(), profileManager.PI_SERVICE ) )
            
Error            
descentmk2s: Cannot find symbol ':getServiceUuids' on type '$.Toybox.Lang.Object'.


item.setEnabled(state==1 ? true : false);
Error
descentmk2s: Cannot find symbol ':setEnabled' on type '$.Toybox.WatchUi.MenuItem'.

How to solve these 2 errors.

Thanks.