function BSEHelpNode::setIDsOfChildren( %this , %parentID )
{
if( %parentID !$= "" )
%pIDhead = %parentID @ ".";
else
%pIDhead = "";
for( %j = 0 ; %j < %this.getCount() ; %j++ )
{
%this.getObject( %j ).id = %pIDhead @ (%j + 1);
%this.getObject( %j ).setIDsOfChildren( %this.id );
}
return 1;
}
It has to be a recursive function so that it can have sections in sections in sections in sections and so on.
%pIDhead stays its value until the for loop. The BSEHelpNodes are ScriptGroups.