|
| 06 Aug 2011 08:46 PM |
Hi scripters,
I am writing a script but it doesn't work...
function onClicked() wait (0.01) script.Parent.Parent.Name = "Authorizing..." wait (5) script.Parent.Parent.Name = "Please Press the Green Button to Confirm Authorization." --This part below me broke. It keeps saying "'Then' expected near '=' but I dunno where to put it..." if script.Parent.Parent.Parent.Parent.OpenButton.Clicked = true then script.Parent.Parent.Name = "WARNING: SYSTEM SECURITY HAS BEEN BREACHED! SOURCE: RAIDER_VIRUS" wait (140) script.Parent.Parent.Name = "Authorize Download of Unknown Program 'RAIDER VIRUS'?" else wait (5) while true do
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Can someone help me? |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2011 08:47 PM |
PS
Can someone tell me how to make it so that below 'else' if the person doesn't click the green button within five seconds it reverbs back to the beggining? THNX! |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 06 Aug 2011 08:48 PM |
| Why is there a random 'while true do' just standing there awkwardly at the end of the function? |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2011 08:49 PM |
| thats where I wanted someone to help me get the script to where after 'else' if the person doesn't click the green button within five seconds it reverbs back to the beggining. Hope someone also tell me how to do that :D |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 06 Aug 2011 08:55 PM |
| actually there are a couple of other problems here.. Firstly, delete the while true do line, then make the = sign in the 'if' into a double =. Then, someone else write the extra bit, my head's hurting too much from something else I'm doing. |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2011 09:01 PM |
Well, I did what you told me to do.
function onClicked() wait (0.01) script.Parent.Parent.Name = "Authorizing..." wait (5) script.Parent.Parent.Name = "Please Press the Green Button to Confirm Authorization." if script.Parent.Parent.Parent.Parent.OpenButton.Clicked == true then script.Parent.Parent.Name = "WARNING: SYSTEM SECURITY HAS BEEN BREACHED! SOURCE: RAIDER_VIRUS" script.Disabled = true wait (140) script.Disabled = false script.Parent.Parent.Name = "Authorize Download of Unknown Program 'RAIDER VIRUS'?" else wait (5) end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
It says 'end' expected (to close 'function' at line 1) near 'eof'
I have no idea what that means at all since I am an amateur scripter... Oh and its really supposed to be "eof" with two marks by the side but it won't let me post the psot with those two symbols D:
Anyone help? |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 06 Aug 2011 09:02 PM |
| Oh yeah, I forgot, that's another error. There should be two 'end's. |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2011 09:02 PM |
clicked = false db = false
function onClicked() if db = false then db = true wait (0.01) script.Parent.Parent.Name = "Authorizing..." script.Parent.Parent.Name = "Please Press the Green Button to Confirm Authorization." wait(5) if clicked then script.Parent.Parent.Name = "WARNING: SYSTEM SECURITY HAS BEEN BREACHED! SOURCE: RAIDER_VIRUS" wait (140) script.Parent.Parent.Name = "Authorize Download of Unknown Program 'RAIDER VIRUS'?" else wait (5) script.Parent.Parent.Name = "didn't press the button" wait(5) end script.Parent.Parent.Name = "" db = false else clicked = true end end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
|
|
|
| Report Abuse |
|
|
| |
|