Set Vert Weights

Hey I'm currently looking for a way to set the vert weights on any array of verts. The problem is the bones that I'm weighting to these verts are unweighted, so I'm unsure of how to get them as a vertex-bone-integer, or bone id.

Here's some of the code so far:

-- skin modifier 
skinMod1 = allmeshpr.modifiers["Skin"] 
/* these are not the real array of bones of course just an example since 
the real array varies from bones in this list, but the list looks similar, 
just names. 
unweighted = #("mAnkleLeft", "mAnkleRight", "mChest", "mCollarLeft", "mCollarRight", "mElbowLeft", "mElbowRight", "mEyeLeft", "mEyeRight", "mFootLeft", "mFootRight", "mHead", "mHipLeft", \ 
"mHipRight", "mKneeLeft", "mKneeRight", "mNeck", "mPelvis", "mShoulderLeft", "mShoulderRight", "mSkull", "mToeLeft", "mToeRight", "mTorso", "mWristLeft", "mWristRight") 
this of course converts the array of names to an array of nodes. 
for each in unweighted do 
        bone1 = (getNodeByName each) 
        if bone1 != undefined do 
            skinOps.addBone skinMod1 bone1 1 
/* now all I need is a way to convert this array of nodes to an array of 
vertex bone integers. But I'm not sure Ive read its not an vertex bone 
interger and max help has a typo it really calls for Bone ID. 

if anymore info is needed pls ask.