Two argument function Error

Why this Function gives Error ? 

SetBarsRequired( -2, -2 );
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

function tf_ma(e,d)
{
for (i=e; i<d; i++)
{
  tf = i * in1Minute;
  TimeframeSet(tf);
    meme =  MA(C,15);
   TimeframeRestore();
  return TimeFrameExpand(meme,tf,expandPoint);
  
}  
}
xxx  = tf_ma(1,9); 
// Why this function gives Error? 


For the above " Error 30" unexpected “return” make sure you are using latest or higher version of Amibroker Software