看板 Flash 關於我們 聯絡資訊
for (var k:int = 1; k<= 40; k++) {this["land" + k + "_mc"].addEventListener(MouseEvent.CLICK, buildhouse1);} function buildhouse1(e:Event):void{ if ( townHall1==true&&buildH1==true){ MovieClip(e.currentTarget).gotoAndStop("house1"); }} else if ( townHall1==true&&buildJ1==true){ MovieClip(e.currentTarget).gotoAndStop("job1"); } else if ( townHall1==true&&buildF1==true){ MovieClip(e.currentTarget).gotoAndStop("food1"); } ctrl+enter後 else if這邊出現錯誤未預期的else 格式不是這樣嗎~"~ 還請大大指點指點 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 125.233.1.40
pm2001:}} 08/29 11:11
aquarianboy:其實有正確的縮排程式碼就會看出問題在哪了 08/29 13:26
p66:原來是要 "{" if(){} else if{} else if{} "}" 08/29 20:44