band.AddBetweenSegments Edit

integer band.AddBetweenSegments(integer segmentIndex1, integer segmentIndex2, [integer atomIndex1], [integer atomIndex2])
Add a band between the two segments. By default bands to the backbone. Specify an atom number from 1 to structure.GetAtomCount() to band to a different atom. Returns band number.
V1 Function Name
More Information

Remarks Edit

Caution: the returned band index may be zero. A zero band index causes an error in other functions, such as band.SetStrength.

One case which returns a zero band index is banding a segment to itself, for example:

bIdx = band.AddBetweenSegments ( 21, 21 )

This is a rare case of a foldit Lua function setting a return code. Most other foldit functions "throw" an error in the case of bad parameters. In most cases, this terminates the recipe, but the thrown error can be "caught" by calling the function in question via the pcall function.

Example Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.