You are missing a couple of ENDIF. Each IF requires a corresponding ENDIF. Please see the KiXtart Manual for correct IF-ENDIF syntax.

Example
code:
$Drive='S'
$Share='\\stymie\Program Files'

If InGroup('accounting')
? 'Mapping drive '+$Drive+' to '+$Share
USE $Drive+':' /Delete
USE $Drive+':' $Share
IF @ERROR
? ' Error mapping drive '+$Drive+' to '+$Share
ELSE
? ' Map Successful'
ENDIF
ENDIF

_________________________
There are two types of vessels, submarines and targets.