7 posts
                
             
            
                Posted 03 January 2013 - 04:23 PM
                I made A lock file and when I start it up it says unfinished string. The Code is
os.pullEvent = os.pullEventRaw
print (" Welcome to LockSmith v1.1 Alpha please enter passcode ")
write("")
x = io.read()
if x == "110011" then
redstone.setOutput ("back". true )
print ("Passcode Accepted…")
sleep(4)
redstone.setOutput ("back", false )
else
term.clear
print ("Passcode Denied…")
sleep(4)
end
os.shutdown()
                
             
         
        
        
            
            
                
                    
                
                135 posts
                
             
            
                Posted 03 January 2013 - 04:26 PM
                put a space in the write function
so itll be
write(" ")
Thats the only thing I can think of
EDIT: Also, I dont think you can have a space in between the print function and its string, so it cant be
print ("blabla")
but it has to be
print("Blabla")
this also goes for the redstone.setOutput()
 
                
             
         
        
        
            
            
                
                    
                
                7508 posts
                
                    
                        Location
                        Australia
                    
                
             
            
                Posted 03 January 2013 - 04:39 PM
                EDIT: Also, I dont think you can have a space in between the print function and its string, so it cant be…….
White space doesn't matter in most high level languages. The compilers are normally smart enough to ignore white space (with a few areas of syntax where there must be none)
 
                
             
         
        
        
            
            
                
                    
                
                135 posts
                
             
            
                Posted 03 January 2013 - 04:42 PM
                EDIT: Also, I dont think you can have a space in between the print function and its string, so it cant be…….
White space doesn't matter in most high level languages. The compilers are normally smart enough to ignore white space (with a few areas of syntax where there must be none)
Alright then, I'm only learning as well :)/>
On topic: 
I just noticed in the first redstone.setOutput(), theres a dot instead of a komma, I'm pretty sure it has to be a , instead of . :)/>
 
                
             
         
        
        
            
            
                
                    
                
                7508 posts
                
                    
                        Location
                        Australia
                    
                
             
            
                Posted 03 January 2013 - 05:24 PM
                Alright then, I'm only learning as well :)/>/>/>
On topic: 
I just noticed in the first redstone.setOutput(), theres a dot instead of a komma, I'm pretty sure it has to be a , instead of . :)/>/>/>
Hey that's fine, we were all at that stage at one point, we all had to learn.
Ahh good pickup, missed that one was looking at all the strings, sometimes hate error messages, especially when we don't get the full error ;)/>
EDIT: Also for OP try to use code tags to make it look better for us to read and help, they are this ['code]['/code] without the ' of course. Also the full error message that you are given DOES help. And lastly long code is handy in pastebin, especially when the error is say at line 40 or 60 or I've even seen one at 250. Easier to find that line in pastebin :)/>
 
                
             
         
        
        
            
            
                
                    
                
                7 posts
                
             
            
                Posted 04 January 2013 - 01:51 PM
                Ok thanks the tutorial I wacthed siad to put spaces
                
             
         
        
        
            
            
                
                    
                
                7 posts
                
             
            
                Posted 04 January 2013 - 01:54 PM
                Ok now it says bois:206: [string "LockSmith"] :18:  '=' expected
                
             
         
        
        
            
            
                
                    
                
                135 posts
                
             
            
                Posted 04 January 2013 - 02:13 PM
                Ok now it says bois:206: [string "LockSmith"] :18:  '=' expected
Please post your current code, and put it in the 
 tags :)/>
 
                
             
         
        
        
            
            
                
                    
                
                7 posts
                
             
            
                Posted 04 January 2013 - 02:18 PM
                Ok just one sec
                
             
         
        
        
            
            
                
                    
                
                7 posts
                
             
            
                Posted 04 January 2013 - 02:20 PM
                os.pullEvent = os.pullEventRaw
print("Welcome to LockSmith v1.1 Alpha please enter passcode")
write(" ")
x = io.read()
if x == "110011" then
redstone.setOutput("back". true )
print("Passcode Accepted…")
sleep(4)
redstone.setOutput("back", false )
else
term.clear
print("Passcode Denied…")
sleep(4)
end
os.shutdown()
                
             
         
        
        
            
            
                
                    
                
                7 posts
                
             
            
                Posted 04 January 2013 - 02:24 PM
                Any Ideas?
                
             
         
        
        
            
            
                
                    
                
                135 posts
                
             
            
                Posted 04 January 2013 - 02:26 PM
                Try changing the first
redstone.setOutput("back". true )
into
redstone.setOutput("back", true)
and finish term.clear into term.clear()
 
                
             
         
        
        
            
            
                
                    
                
                25 posts
                
                    
                        Location
                        A flatland world with 100's of computers and a village that was covered with lava with a parkour course about it; Minecraftia.
                    
                
             
            
                Posted 04 January 2013 - 02:29 PM
                put a space in the write function
so itll be
write(" ")
Thats the only thing I can think of
EDIT: Also, I dont think you can have a space in between the print function and its string, so it cant be
print ("blabla")
but it has to be
print("Blabla")
this also goes for the redstone.setOutput()
That doesnt matter at all 
The problem is that you did term.clear and not term.clear()If i helped it all. Press DAT littel' green fellah' :o/>
 
                
             
         
        
        
            
            
                
                    
                
                25 posts
                
                    
                        Location
                        A flatland world with 100's of computers and a village that was covered with lava with a parkour course about it; Minecraftia.
                    
                
             
            
                Posted 04 January 2013 - 02:30 PM
                EDIT: Also, I dont think you can have a space in between the print function and its string, so it cant be…….
White space doesn't matter in most high level languages. The compilers are normally smart enough to ignore white space (with a few areas of syntax where there must be none)
Alright then, I'm only learning as well :)/>
On topic:
I just noticed in the first redstone.setOutput(), theres a dot instead of a komma, I'm pretty sure it has to be a , instead of . :)/>
 It does indeed. :)/> Although the problem is that you did term.clear and not term.clear() towards the end.
 
                
             
         
        
        
            
            
                
                    
                
                25 posts
                
                    
                        Location
                        A flatland world with 100's of computers and a village that was covered with lava with a parkour course about it; Minecraftia.
                    
                
             
            
                Posted 04 January 2013 - 02:32 PM
                os.pullEvent = os.pullEventRaw
print("Welcome to LockSmith v1.1 Alpha please enter passcode")
write(" ")
x = io.read()
if x == "110011" then
redstone.setOutput("back". true )
print("Passcode Accepted…")
sleep(4)
redstone.setOutput("back", false )
else
term.clear
print("Passcode Denied…")
sleep(4)
end
os.shutdown()
For future reference. Put your code in the code tag. Like this: 
FUS RO DAHHHH
 
                
             
         
        
        
            
            
                
                    
                
                7 posts
                
             
            
                Posted 04 January 2013 - 02:35 PM
                Thanks it now works
Now my base is protected in this server