1291
Drama / Re: Hello, I'm new
« on: July 20, 2013, 08:17:31 PM »
epicbat3 has sent me his richard picture before. I haven't viewed it (for obvious reasons) but he claims that it is 7" long and other people have said it's really hot.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
1:06 AM - Axo-Tak: Sometimes I wish I was under-talkative rather than over-talkative.
Does the white guy have Mr. Wiggles equipped?
Tezuin's jail rp
That's cute. :)
inb4 richard picturesThat'd just add work load to the moderators.
NOAndrogynous?
Also this thread needs more boys
function BSEHelpNode::setIDsOfChildren( %this )
{
if( %this.id $= "" )
%idHead = "";
else
%idHead = %this.id @ ".";
for( %i = 0 ; %i < %this.getCount() ; %i++ )
{
%obj = %this.getObject( %i );
%obj.id = %idHead @ (%i + 1);
if( %obj.getCount() > 0 )
%obj.setIDsOfChildren();
}
return 1;
}Add in some echoes and show us the result.
function BSEHelpNode::setIDsOfChildren( %this , %parentID )
{
echo("<item=" @ %parentID SPC %this.id @ ">");
if( %parentID !$= "" )
{
echo(%parentID SPC %this.id @ ": has a parent");
%name = %parentID @ ".";
}
else
{
echo(%parentID SPC %this.id @ ": has no parent");
%name = "";
}
echo(%parentID SPC %this.id @ ": before for" SPC %name);
for( %j = 0 ; %j < %this.getCount() ; %j++ )
{
echo(%parentID SPC %this.id @ ": after for" SPC %name);
echo(%parentID SPC %this.id @ ": iterator " @ %j + 1 SPC %this.getCount());
%this.getObject( %j ).id = %name @ (%j + 1);
%this.getObject( %j ).setIDsOfChildren( %this.id );
}
echo("</item=" @ %parentID SPC %this.id @ ">");
return 1;
<item= >
: has no parent
: before for
: after for
: iterator 1 6
<item= 1>
1: has no parent
1: before for
</item= 1>
: after for
: iterator 2 6
<item= 2>
2: has no parent
2: before for
</item= 2>
: after for
: iterator 3 6
<item= 3>
3: has no parent
3: before for
3: after for
3: iterator 1 2
<item=3 1>
3 1: has a parent
3 1: before for 3.
</item=3 1>
3: after for
3: iterator 2 2
<item=3 2>
3 2: has a parent
3 2: before for 3.
</item=3 2>
</item= 3>
: after for
: iterator 4 6
<item= 4>
4: has no parent
4: before for
4: after for
4: iterator 1 1
<item=4 1>
4 1: has a parent
4 1: before for 4.
</item=4 1>
</item= 4>
: after for
: iterator 5 6
<item= 5>
5: has no parent
5: before for
</item= 5>
: after for
: iterator 6 6
<item= 6>
6: has no parent
6: before for
</item= 6>
</item= >
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.