|
| 05 Feb 2014 02:23 PM |
How many ends and )'s do I need in this script? Also will this script work? If not what do I need to do to fix it?
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == ":Dominus me" or ":DOMINUS ME" or ":dominus me" then for i, v in pairs(plrz) do
if v and v.Character then local obj = game:service("InsertService"):LoadAsset(31101391) for a,hat in pairs(obj:children()) do if hat:IsA("Hat") then hat.Parent = v.Character end end obj:Destroy()
|
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 05 Feb 2014 02:24 PM |
| I suggest you rewrite it with Falcon Scripting Plugin, it will automatically do this. |
|
|
| Report Abuse |
|
|
| |
|
iYoshiFox
|
  |
| Joined: 14 Apr 2012 |
| Total Posts: 1058 |
|
|
| 05 Feb 2014 02:52 PM |
end end end end end) end)
--Put dat at the end o3o |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 03:17 PM |
Nope. It says ')' expected (to close '(' at line 2) near 'end' on line 15.
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == ":Dominus me" or ":DOMINUS ME" or ":dominus me" then for i, v in pairs(plrz) do
if v and v.Character then local obj = game:service("InsertService"):LoadAsset(31101391) for a,hat in pairs(obj:children()) do if hat:IsA("Hat") then hat.Parent = v.Character end end obj:Destroy()
end end end end end) end)
|
|
|
| Report Abuse |
|
|
| |
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 05 Feb 2014 03:43 PM |
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == ":Dominus me" or ":DOMINUS ME" or ":dominus me" then for i, v in pairs(plrz) do if v and v.Character then local obj = game:service("InsertService"):LoadAsset(31101391) for a,hat in pairs(obj:children()) do if hat:IsA("Hat") then hat.Parent = v.Character end end obj:Destroy() end end end end) end) |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 05 Feb 2014 03:45 PM |
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg:lower() == ":dominus me" then for i, v in pairs(plrz) do if v and v.Character then local obj = game:service("InsertService"):LoadAsset(31101391) for a,hat in pairs(obj:children()) do if hat:IsA("Hat") then hat.Parent = v.Character end end obj:Destroy() end end end end) |
|
|
| Report Abuse |
|
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 05 Feb 2014 03:46 PM |
| Anyone who doesn't know what they're doing please stop posting; mine works fine and has the proper end amount. |
|
|
| Report Abuse |
|
|
catsplz
|
  |
| Joined: 08 Sep 2011 |
| Total Posts: 17789 |
|
|
| 05 Feb 2014 03:48 PM |
im sort of a noob to scripting but isnt "plrz" supposed to be "plrs" or am i just insane |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 05 Feb 2014 03:49 PM |
Oops I'm missing a final 'end)' at the end, sorry!
azu out |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 05 Feb 2014 04:16 PM |
| All you have to keep in mind is: "everything that is opened must be closed" yes, this includes parenthesis, brackets, braces, quotes (single and double), statements, pretty much everything. |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 04:18 PM |
| Most things that need an end will be opened with an |> arrow on the left side of the script. |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 04:42 PM |
@Azureous
Your's did not work. |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 04:44 PM |
| Alright nothing's working. I must be doing something else wrong. Anyone know what I have to fix? |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 04:46 PM |
It's 6 ends with the last 2 closing parenthesis. I think.
#nerdsunited |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Feb 2014 06:30 PM |
| I don't think the ends or the )'s are the problem... |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
| |
|
| |
|
catsplz
|
  |
| Joined: 08 Sep 2011 |
| Total Posts: 17789 |
|
| |
|
| |
|
EcIiptic
|
  |
| Joined: 12 Aug 2009 |
| Total Posts: 13737 |
|
|
| 05 Feb 2014 07:05 PM |
Rower#
Not entirely sure how to help you here, but I did spot one thing that might help you.
if msg == ":Dominus me" or ":DOMINUS ME" or ":dominus me" then
Make it
if msg:lower() == ":dominus me"
That way, you don't need to add so many 'or's, and it will work for whatever. |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 07:07 PM |
Yeah that would help. Thanks..... But the script still doesn't work!!!
*Rage mode* |
|
|
| Report Abuse |
|
|
EcIiptic
|
  |
| Joined: 12 Aug 2009 |
| Total Posts: 13737 |
|
|
| 05 Feb 2014 07:12 PM |
PlayerList = game.Players:GetChildren()
game.Players.PlayerAdded:connect(function(plyr) plyr.Chatted:connect(function(msg) if msg:lower() == ":dominus me" then
for i, player in pairs(PlayerList) do if v and v.Character then local obj = game:service("InsertService"):LoadAsset(31101391) for a, hat in pairs(obj:GetChildren()) do if hat:IsA("Hat") then hat.Parent = v.Character end end end end end obj:Destroy() end) end)
This should work. |
|
|
| Report Abuse |
|
|