You need to see how many limbs the object currently has, and then add the next limb; like this:
make mesh from object 1,1
perform checklist for object limbs 1
limb_to_use = checklist quantity()
add limb 1,limb_to_use,1
offset limb 1,1,0.0,0.0,100.0
You are probably wondering why I didn't add one to the 'checklist quantity' to get the next limb. This is because it is zero based. [From the help files: When referencing
the limbs by number, the limb index starts at zero. This index differs from the index used to search the checklist, which
has an index starting at one. ]
Additionally, the code you listed for offsetting the limb did not contain the object number and limb number. Also, the values for the x,y, and z offsets are real (float) numbers. I have listed it correctly in the snippet.
Hope this helps,
LB