Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 12 Sep 2015 04:21 PM |
I have this, but it doesn't seem to work. Note, there's more above.
function AssignSettings() local AssignedSetting = false local function ApplyRanks() for Players in string.gmatch(AdminSettings["Ranks"]["Owner"].Value, "%w+") do table.insert(Settings.Ranks["Owner"], Players) AssignedSetting = true end for Players in string.gmatch(AdminSettings["Ranks"]["CoOwner"].Value, "%w+") do table.insert(Settings.Ranks["CoOwner"], Players) AssignedSetting = true end for Players in string.gmatch(AdminSettings["Ranks"]["Moderator"].Value, "%w+") do table.insert(Settings.Ranks["Moderator"], Players) AssignedSetting = true end for Players in string.gmatch(AdminSettings["Ranks"]["VIP"].Value, "%w+") do table.insert(Settings.Ranks["VIP"], Players) AssignedSetting = true end for Players in string.gmatch(AdminSettings["Ranks"]["Member"].Value, "%w+") do table.insert(Settings.Ranks["Member"], Players) AssignedSetting = true end for Players in string.gmatch(AdminSettings["Ranks"]["Admin"].Value, "%w+") do table.insert(Settings.Ranks["Admin"], Players) AssignedSetting = true end for Players in string.gmatch(AdminSettings["Ranks"]["Banned"].Value, "%w+") do table.insert(Settings.Ranks["Banned"], Players) AssignedSetting = true end for Players in string.gmatch(AdminSettings["Ranks"]["Crashed"].Value, "%w+") do table.insert(Settings.Ranks["Crashed"], Players) AssignedSetting = true end for Players in string.gmatch(AdminSettings["Ranks"]["Muted"].Value, "%w+") do table.insert(Settings.Ranks["Muted"], Players) AssignedSetting = true end return AssignedSetting end local function Apply_() if Settings.Prefix then Settings.Prefix = AdminSettings.Prefix.Value AssignedSetting = true end if Settings.Bet then Settings.Bet = AdminSettings.Bet.Value AssignedSetting = true end return AssignedSetting end ApplyRanks() Apply_() end function onPlayerAdded(Player) return Player end Server.Players.PlayerAdded:connect(onPlayerAdded, AssignSettings) for _,c in pairs(Settings.Ranks["Owner"]) do print(c) end
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2015 04:23 PM |
I have no idea what you're trying to do, so I'll respond to the title.
function MyFunction() local newFunction = function(x,y) print(x,y) end end |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 12 Sep 2015 04:26 PM |
Oh, this is a small fragment of an admin script I am currently scripting.
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 12 Sep 2015 04:29 PM |
So, anyone know?
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 12 Sep 2015 04:38 PM |
Anyone? Little help would be nice.
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 12 Sep 2015 04:42 PM |
didnt the previous one work?
~davisky~ |
|
|
| Report Abuse |
|
|
robomax11
|
  |
| Joined: 07 Jul 2011 |
| Total Posts: 6828 |
|
|
| 12 Sep 2015 04:53 PM |
function Swag(arg) local function nope(not) print(not) end; nope(arg); end
Swag("hi") >hi nope('hi') >nil becus function is local
| 432,147 | R$42,344 | swag |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Sep 2015 04:56 PM |
hehehe
function a(c) function b() c = c + 1 print(c) end end
a(0) b()b()b() a(0) b()b()b() |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 12 Sep 2015 05:01 PM |
@David What previous one?
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 12 Sep 2015 05:02 PM |
"@David" I mean @Davis
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 12 Sep 2015 05:22 PM |
Still a little confused.
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 12 Sep 2015 05:39 PM |
Hmm, anyone?
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|
notfruit
|
  |
| Joined: 21 Sep 2012 |
| Total Posts: 1386 |
|
|
| 12 Sep 2015 05:44 PM |
If you need to run a local function inside another function then you're probably doing something wrong.
Think about what ur code has to do and split up tasks into groups. Put those groups into modules and those modules into functions and hook them up. Rewrite your code and don't do it again, young man. >:( |
|
|
| Report Abuse |
|
|
Luxurize
|
  |
| Joined: 31 Mar 2015 |
| Total Posts: 1289 |
|
|
| 12 Sep 2015 06:30 PM |
Aaaand once again, stupid me didn't realise the main function wasn't even being called. Welp, derp.
“Insane isn't always black or white. We're all pathological, in our own ways.” |
|
|
| Report Abuse |
|
|