2012-08-29 36 views
1

我的兒子用鞋做了一個有趣的程序,它基本上和紅寶石一樣,但是有一個gui。 (只有區別我知道的語法是警報而不是。)他在運行它時看到了錯誤並向我打來。我找不到所有這些錯誤的原因。 *代替分類信息。語法錯誤意想不到的關鍵字結束'}'鞋子

謝謝

Shoes.app do 
#revised lines 1-17 
line = ask "Password (lowercase)" 
    if line == "password" 
    #superuser password for fast login 
    alert "Logged In" 
    name = ask "Name (lowercase)" 
     if name == "***" 
     alert "Welcome, ***" 
     alert "Now, please verify your identity" 
     idconfirm = ask "What is your 4 digit ID number; if unknown, type 'u'" 
      if idconfirm == "u" 
      alert "Please contact *** immediatly at ********@gmail.com" 
      end 
      if idconfirm == "******" 
      alert "Administrator Code accepted" 
      alert "What do you wish to do now?" 
      stack(:align => "center") { #stack is for buttons 
       button "Latest projects (bip)" do 
        stack(:align => "center") { #stack is for paragraph and buttons 
         para "================================================================== 
         build an IRC bot FRAMEWORK 
         learn more languages 
         tri-boot? 
         backup files for win 8 clousre (WHEN NECESSARY)" 
         button "Rblx Assignments" { 
          rblxconf = ask "PASSCODE" 
           if rblxconf == "***********" 
           #not FINISHED continue       
           para(:align => "center") #CHECK LINE PARA_NTHESES 
           "=============================================================== 
           learn roblox script 
           build own admin script 
           build roblox *** 
           find other ways to *******" 
           else 
           alert "Not Correct" #revise alert 
           end 
          } 
         } 
        end 
       button "WELCOME" 
       } 
     end 


#revised up to here CONFIRMED 
     if idconfirm == "****" 
      alert "Thank You, ***. What do you want to do now?" 
      stack(:align => "center") do #stack is for buttons 
       button "Latest projects (bip)" do 
        stack(:align => "center") { 
         para "================================================================== 
         build an IRC bot FRAMEWORK 
         learn more languages 
         tri-boot? 
         backup files for win 8 clousre (WHEN NECESSARY)" 
         button "Rblx Assignments" { 
          rblxconf = ask "PASSCODE" 
          if rblxconf == "***********" 
           #not FINISHED continue       
           para(
           :align => "center") 
           "=============================================================== 
           learn roblox script 
           build own admin script 
           build roblox *** 
           find other ways to *******" 
          else 
           alert "Not Correct" 
          end 
          } 
         } 
        end 
       button "WELCOME" 
       button "Admin Log In" do 
        adminconfirm = ask "Admin Code (Hint:MMORPG accounts)" 
         if adminconfirm == "******" 
         alert "Administrator Code accepted" 
         alert "What do you wish to do now" 
         #IN PROGRESS 
         end 
       end 
      end 
     end 
     else 
     alert "Your name is not registered" 
     end  
    #superuser password for fast login 
    else 
    alert "Wrong Password" 
    end 
#REVISED UP TO HERE [CONFIRMED] 

# +========================================================================================================================================================= 
#REVISE EVERYTHING OK? 
#revise 25 39 42 55 78 82 & 86 and more ;P 
end 
+0

粘貼完整的例外 - 它應該包含一個對行號的引用有問題。 – girasquid

+1

你的身份有點到處 - 這些東西很容易發現與一致的縮進 –

回答

0

嘗試切換所有的 '{' '做',你的 '}' 到 '結束'。一旦我這樣做,我就不會收到錯誤。

沒有鞋子的經驗,我不知道爲什麼它很重要。但是兩者之間存在細微的差異 - 請參閱do..end vs curly braces for blocks in Ruby

+0

謝謝你的工作 – user1634109

相關問題