Author Topic: Function contracts [Resolved]  (Read 710 times)

I've noticed that on many functions there are a few things,
a description when they're shown in a dump
and info about the function/inputs when the function is called empty

How is this done?
« Last Edit: July 16, 2012, 09:31:10 AM by Ipquarx »

and info about the function/inputs when the function is called empty
function derp(%derp)
{
   if(%derp $= "")
   {
      echo("blah");
      return;
   }
}


???

I've noticed that on many functions there are a few things,
a description when they're shown in a dump
and info about the function/inputs when the function is called empty

How is this done?
Engine descriptions. Notice no Blockland specific functions contain this.

If you want to enter in a description, just test if there's no input arguments and then print instructions.

function derp(%derp)
{
   if(%derp $= "")
   {
      echo("blah");
      return;
   }
}


???
Yeah i sorta had a brain fart on the last one, but engine descriptions are what they are. Okay.