|
| 26 Feb 2015 01:28 PM |
I have this team chat script, and i keep getting this error with one of the (End)(S) in the script. Here is the script...
self = script.Parent gW = game.Workspace gL = game.Lighting
game.Players.PlayerAdded:connect(function(np) repeat wait(1) until np:findFirstChild("PlayerGui") np.Chatted:connect(function(IM) for i, v in pairs(game.Players:GetChildren()) do for g = 1,2,3 do for i, v1 in pairs(script["Side"..g..""]:GetChildren()) do if np.TeamColor == v1.Value then for i, v2 in pairs(script["Side"..g..""]:GetChildren()) do if v.TeamColor == v2.Value then for i, v3 in pairs(script["Side" ..g..""]:GetChildern()) do if v.TeamColor == v3.Value then v.PlayerGui.TeamChatGUI.input.Value = ""..np.Name..": "..IM.. end end end end end end end end end) end)
The very first end after the last command is underlined in red. Output is telling me there is a unexpected symbol. But what does that mean? I tried everything.. |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 26 Feb 2015 01:31 PM |
1) You didn't finish the line. You have ..IM.. but then nothing after that .. It expects something on the right 2) Your algorithm is n³... what are you doing? |
|
|
| Report Abuse |
|
|
iondriver
|
  |
| Joined: 18 Nov 2012 |
| Total Posts: 757 |
|
|
| 26 Feb 2015 01:32 PM |
Should be fixed.
self = script.Parent gW = game.Workspace gL = game.Lighting
game.Players.PlayerAdded:connect(function(np) repeat wait(1) until np:findFirstChild("PlayerGui") np.Chatted:connect(function(IM) for i, v in pairs(game.Players:GetChildren()) do for g = 1,2,3 do for i, v1 in pairs(script["Side"..g..""]:GetChildren()) do if np.TeamColor == v1.Value then for i, v2 in pairs(script["Side"..g..""]:GetChildren()) do if v.TeamColor == v2.Value then for i, v3 in pairs(script["Side" ..g..""]:GetChildern()) do if v.TeamColor == v3.Value then v.PlayerGui.TeamChatGUI.input.Value = ""..np.Name..": "..IM end end end end end end end end end) end)
You had .. after IM, The computer thought that you needed to concatenate something. |
|
|
| Report Abuse |
|
|