2013-04-18 42 views
0

Sahi腳本中if-else-if語句的語法是什麼?以下語法錯誤失敗:Sahi處理嵌套的else-if語句嗎?

function caseSwitch($htype){ 
    if($htype==22){ 
     type22(); 
    } 
    else{ 
     if($htype==5){ 
      type5(); 
     } //I have tried adding a semicolon here and it still fails 
    } 
    else 
    { 
     _log("Whoops, Hierarchy Type " + $htype + " has not been automated yet"); 
    } 
} 

回答