dasfunny
|
  |
| Joined: 24 Jan 2011 |
| Total Posts: 911 |
|
|
| 26 Dec 2011 11:10 PM |
permission = {"dasfunny"}
function check(val) for i = 1, #permission do if permission[i]:upper() == val:upper() then return true else return false end end end
game.Players.PlayerAdded:connect(function(plr) --Again, argument names don't matter plr.CharacterAdded:connect(function(c) if check(plr.Name) == true then print("Player can stay.") else c:BreakJoints() end) end end) |
|
|
| Report Abuse |
|
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 27 Dec 2011 12:16 AM |
| Wouldn't it be :lower() not :upper()? |
|
|
| Report Abuse |
|
|
Legend26
|
  |
| Joined: 08 Sep 2008 |
| Total Posts: 10586 |
|
|
| 27 Dec 2011 12:17 AM |
Your last line of ends is your problem:
end) end end) should be: end end) end) |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2011 12:19 AM |
You've got the ends wrong. First of all, it's ugly when you put them all on one line, don't do that. :c
Second, you have to match up the parentheses right. When it gets to the first end, it ends the last scope that it started, the one with the 'if' statement. Then it gets to the end parenthesis. It looks up right before the end, but the first thing it sees is a function, which requires an end, not an end parenthesis. You gotta have everything in the right order, things can't overlap like that.
end end) end)
@Legend: stop earlyposting. kk |
|
|
| Report Abuse |
|
|
Legend26
|
  |
| Joined: 08 Sep 2008 |
| Total Posts: 10586 |
|
| |
|