Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 02 Oct 2015 08:56 PM |
Like
function dosomething() --code function dosomethingelse() --code end dosomethingelse() end
u sicko! |
|
|
| Report Abuse |
|
|
| |
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 02 Oct 2015 09:11 PM |
Thank the Lord. Thanks.
u sicko! |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2015 09:16 PM |
| Yes you can but you really shouldn't things can get messy |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2015 09:22 PM |
| It won't get messy at all depending on how you write it. Closures are a very useful concept. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 02 Oct 2015 09:23 PM |
| 99% of the time, it makes your code less efficient because it requires closure creations every time you call the enclosing function. |
|
|
| Report Abuse |
|
|
vastqud
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 2464 |
|
|
| 02 Oct 2015 09:36 PM |
I think doing that is very helpful
and I also don't think that a 0.1 second delay is really anything to complain about when you do so
for me, it just makes things a lot more efficient and easier to write |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 02 Oct 2015 09:37 PM |
'for me, it just makes things a lot more efficient and easier to write' Less efficient and easier to write (arguably, it's preference)
But yes, if it's easier to read and use then do it. |
|
|
| Report Abuse |
|
|
vastqud
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 2464 |
|
|
| 02 Oct 2015 09:40 PM |
| whenever I do it, it is probably 100 times easier and more efficient for me than using a crap load of other things just to do one thing that I could've done by putting functions in functions |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 02 Oct 2015 10:29 PM |
| No, you're just doing something wrong if it requires you to do 'crap load of other things'. |
|
|
| Report Abuse |
|
|
vastqud
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 2464 |
|
|
| 03 Oct 2015 08:18 AM |
no I wasn't doing anything wrong
I just think that it requires much more time and skill to not put a function in a function |
|
|
| Report Abuse |
|
|
iWindowz
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1809 |
|
|
| 03 Oct 2015 08:26 AM |
yes how to make it not look messy:
#code function hi() -- if you want a function in here, it's smarter if you tab it once. function hello() --code end --code end ofc you need roblox+ to properly view this
#code --hello there! |
|
|
| Report Abuse |
|
|