Reputation: 13
I am still new to programing but I have a AppleScript Error that I need help with. I am creating a prank using AppleScript but this error message showed up when I tried to compress the file.
Expected “else”, etc. but found end of script.
Here is my code. Please help me fix this! Thanks!
display dialog "Virus Detected" buttons {"Shut Down", "Crash CPU"} default button 2
if the button returned of the result is "Shut Down" then
beep 10
display dialog "Virus Downloaded. Commencing Virus Deletion Process. Shutting Down"
say "Virus Deletion Process FAILED. Virus Downloaded. Shut Down Has Been Overrided"
display dialog "All Systems Has Been Hacked. Computer Is Now Overloading"
display dialog "Passwords Have Been Hacked" buttons {"Abort"}
if the button returned of the result is "Abort" then
display dialog "About Has Been Overrided. Passwords Are Now Uploading" buttons {"Cancel"}
if the button returned of the result is "Cancel" then
display dialog "Overrided. Uploading Complete. Deleting ALL Files From Main Data Base."
say "Deletion Complete"
display dialog "Shutting Down"
tell application "Finder" to shut down
else
beep 10
display dialog "Virus Downloaded Successfully. Computer Has Been Hacked"
say "Virus Has Hacked Into The Motherboard"
display dialog "Deleting All Files. Restoring From Backup"
say "No Backups Were Found"
display dialog "Deleting ALL Data. Computer Is Now Crashing. Shutting Down"
tell application "Finder" to shut down
end if
Upvotes: 1
Views: 35
Reputation: 285220
In line 8 and 10 there are two if
clauses.
Each of them must be balanced with an end if
(before the else
)
Upvotes: 1