PReEMa
|
  |
| Joined: 31 Jul 2012 |
| Total Posts: 9 |
|
|
| 24 Aug 2012 07:22 PM |
Like I want to use loadstring()() to load functions that I have in a separate script. Can I do that?
Or is there another way to assign global functions? |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2012 07:50 PM |
| You can use loadstring()() or you can use Global Functions, but I believe Global Functions may break later on. |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2012 07:51 PM |
No, you can't get the source of scripts unless you're using a plugin.
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2012 07:52 PM |
| I know that, but I think he meant, wait... I thought he meant execute a script... Never mind listen to swim. |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2012 08:01 PM |
| Wasn't loadstring removed? That's what the news said... |
|
|
| Report Abuse |
|
|
| |
|
|
| 24 Aug 2012 08:09 PM |
No, bytecode was disabled. Loadstring()() still works.
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2012 08:11 PM |
| Oh, okay good.. I miss bytecode... No more string.byte, eh? |
|
|
| Report Abuse |
|
|
PReEMa
|
  |
| Joined: 31 Jul 2012 |
| Total Posts: 9 |
|
|
| 24 Aug 2012 09:06 PM |
| So, I can't have a script read a function off of another script, right? |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 24 Aug 2012 09:18 PM |
@PReEMa, Yes, Use a global function, If the function is one that you call, then put this before it: _G["functionname"] = (function()) then to call it I think _G.functionname(parameter(s)) |
|
|
| Report Abuse |
|
|