|
| 10 Mar 2013 04:38 PM |
Hi there!
I am making an API for fellow scripters but ive ran into a problem. My API is a script with a bunch of functions, but how do scripts use functions from other scripts? I have heard there is an `include` thing. Much help would be appreciated. =)
Thanks, Blenderman9000 |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 10 Mar 2013 04:43 PM |
| http://wiki.roblox.com/index.php/Global_Functions |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2013 04:45 PM |
| Thank you Azarth, I will look into that. |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2013 05:40 PM |
_G(function name)
I think this is it. |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2013 05:55 PM |
Close.
_G["Hello"] = function() print("Hello, World!") end --Now to call it _G.Hello() --Output: Hello, World! |
|
|
| Report Abuse |
|
|
velibor
|
  |
| Joined: 24 Nov 2009 |
| Total Posts: 1003 |
|
|
| 10 Mar 2013 05:56 PM |
I always create Methods for that.. (My own Objects by creating tables and then use getfenv() to set the environment)
|
|
|
| Report Abuse |
|
|
| |
|