Code:
$adsPath = "WinNT://" + $strDomain + "/" + $strUser
$adsObj=GetObject($adsPath)

$strHomeDIR = $adsObj.HomeDirectory

goSub MapDrives()


FuncMapDrive("P:", strHomeDIR) 



You missing a few odd's and ends like the variables $strDomain and $strUser....

the last 2 lines.... refer to other parts of the script... so... i took my best guess.