|
| 03 Jul 2012 06:39 AM |
"Workspace.Door.Group Chat:29: unexpected symbol near ')'"
I think I might be missing an end or something, but I would like verification.
Here's the script:
game.Players.PlayerAdded:connect(function(pa) pa.Chatted:connect(function(msg) if pa:IsInGroup(165491) then --group id if string.lower(msg) == "[]startsimulation" then local warn = Instance.new ("Message") warn.parent = workspace warn.text = "-AdvorsusDuo- Please confirm execution of TRARAIDSIM." if string.lower(msg) == "[]no" then return end if string.lower(msg) == "[]confirm" then warn:remove() local intro = Instance.new ("Message") intro.Parent = workspace intro.Text = "-AdvorsusDuo- TRARAIDSIM.exe running." wait(5) intro.Text = "-AdvorsusDuo- Please listen to your trainers for further instructions." wait(10) intro.Text = "-AdvorsusDuo- TRA Raid Simulation will now begin. Split teams evenly and go to the red spawn or blue spawn." wait(10) intro:remove() for i = 0,1, 0.1 do script.Parent.Transparency = i wait(.1) end script.Parent.CanCollide = false end end end) end) |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2012 06:43 AM |
| The output is referring to the second to last end, where it says end). |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2012 06:49 AM |
| I can't find anything wrong with the script, but I would use :Destroy() instead of :remove() |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2012 06:50 AM |
Why destroy?
I was told that they're pretty much the same. |
|
|
| Report Abuse |
|
|
Nartle
|
  |
| Joined: 29 Mar 2008 |
| Total Posts: 7202 |
|
|
| 03 Jul 2012 06:55 AM |
| :Destroy() makes it permanently removed, if I'm not mistaken, whilst :remove() only makes it = nil. |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2012 07:01 AM |
Okay well this is the script now after changing the removes to Destroys, with the "--AdvorsusDuo" being line 1.
--AdvorsusDuo
game.Players.PlayerAdded:connect(function(pa) pa.Chatted:connect(function(msg) if pa:IsInGroup(165491) then --group id if string.lower(msg) == "[]startsimulation" then local warn = Instance.new ("Message") warn.parent = workspace warn.text = "-AdvorsusDuo- Please confirm execution of TRARAIDSIM." if string.lower(msg) == "[]no" then return end if string.lower(msg) == "[]confirm" then warn:Destroy() local intro = Instance.new ("Message") intro.Parent = workspace intro.Text = "-AdvorsusDuo- TRARAIDSIM.exe running." wait(5) intro.Text = "-AdvorsusDuo- Please listen to your trainers for further instructions." wait(10) intro.Text = "-AdvorsusDuo- TRA Raid Simulation will now begin. Split teams evenly and go to the red spawn or blue spawn." wait(10) intro:Destroy() for i = 0,1, 0.1 do script.Parent.Transparency = i wait(.1) end script.Parent.CanCollide = false end end end) end)
The output still says Workspace.Door.Group Chat:29: unexpected symbol near ')' |
|
|
| Report Abuse |
|
|
Nartle
|
  |
| Joined: 29 Mar 2008 |
| Total Posts: 7202 |
|
|
| 03 Jul 2012 07:10 AM |
I think... You need another end.
Four "if"s, one "for", and two "functions" = 7 ends. You have 6... |
|
|
| Report Abuse |
|
|
Nartle
|
  |
| Joined: 29 Mar 2008 |
| Total Posts: 7202 |
|
| |
|
|
| 03 Jul 2012 07:14 AM |
No, I added an end, and now the script seems to be working correctly according to the output.
When I went to test it in my regular place (not play solo) I said "[]startsimulation" and nothing happened. |
|
|
| Report Abuse |
|
|
Nartle
|
  |
| Joined: 29 Mar 2008 |
| Total Posts: 7202 |
|
|
| 03 Jul 2012 07:15 AM |
| Yeah I noticed. Trying to think what that problem is. |
|
|
| Report Abuse |
|
|
Nartle
|
  |
| Joined: 29 Mar 2008 |
| Total Posts: 7202 |
|
|
| 03 Jul 2012 07:17 AM |
| Parent is supposed to be with a capital, right? |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2012 07:21 AM |
| Indeed, I just fixed that, still nothing happening. |
|
|
| Report Abuse |
|
|
Nartle
|
  |
| Joined: 29 Mar 2008 |
| Total Posts: 7202 |
|
|
| 03 Jul 2012 07:21 AM |
| How about Text right under the non-capitlised Parent? |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2012 07:26 AM |
| Ha, just fixed that and now the beginnning works, but when I use the command as shows "[]no" and "[]confirm" the script doesn't do anything else and the message is stuck. |
|
|
| Report Abuse |
|
|
Nartle
|
  |
| Joined: 29 Mar 2008 |
| Total Posts: 7202 |
|
|
| 03 Jul 2012 07:30 AM |
Now, I'm thinking about that and I'm thinking this.
:remove() <3 |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2012 07:30 AM |
This is what I have now, line 1 starting at "--AdvorsusDuo":
--AdvorsusDuo
game.Players.PlayerAdded:connect(function(pa) pa.Chatted:connect(function(msg) if pa:IsInGroup(165491) then --group id if string.lower(msg) == "[]startsimulation" then local warn = Instance.new ("Message") warn.Parent = Workspace warn.Text = "-AdvorsusDuo- Please confirm execution of TRARAIDSIM." if string.lower(msg) == "[]no" then return end if string.lower(msg) == "[]confirm" then warn:Destroy() local intro = Instance.new ("Message") intro.Parent = Workspace intro.Text = "-AdvorsusDuo- TRARAIDSIM.exe running." wait(5) intro.Text = "-AdvorsusDuo- Please listen to your trainers for further instructions." wait(10) intro.Text = "-AdvorsusDuo- TRA Raid Simulation will now begin. Split teams evenly and go to the red spawn or blue spawn." wait(10) intro:Destroy() for i = 0,1, 0.1 do script.Parent.Transparency = i wait(.1) end script.Parent.CanCollide = false end end end end) end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Jul 2012 07:32 AM |
| Changing the destroys back to removes didn't change anything ._. |
|
|
| Report Abuse |
|
|
Nartle
|
  |
| Joined: 29 Mar 2008 |
| Total Posts: 7202 |
|
|
| 03 Jul 2012 07:41 AM |
Well, I have a theory.
Just let me do a quick read and also let me ask this...
Why not use your first message for the messages after? Instead you make the first message go away and a new message appear instantly after that.
Also nevermind, found what I was looking for. Maybe this will work? I changed the "intro" into "warn", 'cause it made me feel better, and then I put an "elseif" instead of a second "if". I also never copied your name :3
game.Players.PlayerAdded:connect(function(pa) pa.Chatted:connect(function(msg) if pa:IsInGroup(165491) then --group id if string.lower(msg) == "[]startsimulation" then local warn = Instance.new ("Message") warn.Parent = workspace warn.Text = "-AdvorsusDuo- Please confirm execution of TRARAIDSIM." if string.lower(msg) == "[]no" then return end if string.lower(msg) == "[]confirm" then warn.Text = "-AdvorsusDuo- TRARAIDSIM.exe running." wait(5) warn.Text = "-AdvorsusDuo- Please listen to your trainers for further instructions." wait(10) warn.Text = "-AdvorsusDuo- TRA Raid Simulation will now begin. Split teams evenly and go to the red spawn or blue spawn." wait(10) warn:Destroy() for i = 0,1, 0.1 do script.Parent.Transparency = i wait(.1) end script.Parent.CanCollide = false end end end) end) |
|
|
| Report Abuse |
|
|
Nartle
|
  |
| Joined: 29 Mar 2008 |
| Total Posts: 7202 |
|
| |
|
Nartle
|
  |
| Joined: 29 Mar 2008 |
| Total Posts: 7202 |
|
|
| 03 Jul 2012 07:43 AM |
Wait, what?
Wrong Copy/paste. One second.
game.Players.PlayerAdded:connect(function(pa) pa.Chatted:connect(function(msg) if pa:IsInGroup(165491) then --group id if string.lower(msg) == "[]startsimulation" then local warn = Instance.new ("Message") warn.Parent = workspace warn.Text = "-AdvorsusDuo- Please confirm execution of TRARAIDSIM." if string.lower(msg) == "[]no" then return end elseif string.lower(msg) == "[]confirm" then warn.Text = "-AdvorsusDuo- TRARAIDSIM.exe running." wait(5) warn.Text = "-AdvorsusDuo- Please listen to your trainers for further instructions." wait(10) warn.Text = "-AdvorsusDuo- TRA Raid Simulation will now begin. Split teams evenly and go to the red spawn or blue spawn." wait(10) warn:Destroy() for i = 0,1, 0.1 do script.Parent.Transparency = i wait(.1) end script.Parent.CanCollide = false end end end) end)
THAT'S BETTER! |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Jul 2012 07:54 AM |
| regardless of what I say, the warn message does not change |
|
|
| Report Abuse |
|
|
Nartle
|
  |
| Joined: 29 Mar 2008 |
| Total Posts: 7202 |
|
|
| 03 Jul 2012 07:54 AM |
| Dang! Same thing happened? |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2012 07:58 AM |
yea
I think maybe the "then return end" may be doing something do it. Is there a way we could sort of "restart" the script on the command "[]no"? |
|
|
| Report Abuse |
|
|