Categories > Coding > Lua >
[REQ] Wrap Global
Posted
How is this function supposed to be used? if you know can you please provide an example >.>
Proud creator of: WRD+
Replied
It pushes the specified Roblox global into the wrapped Lua environment's globals. It's useful to use if there is a global that isn't already used in the WRD API. For example, the "UserSettings" global isn't available. You can make it available by using WrapGlobal("UserSettings")
Cancel
Post
Replied
So if I understand right it would be something like
[code]
-- Within the executor
print(workspace) --> nil
WrapGlobal('workspace') --# Makes the global availiable
print(workspace) --> Workspace
[/code]
Cancel
Post
Proud creator of: WRD+
Replied
That's cool. At first I thought it was something to make global changes/variables, like:
[code]
WrapGlobal("function game:debug() end")
-- Other script:
game:debug()
[/code]
Anyways, thanks for the info, it had me confused.
Cancel
Post
Proud creator of: WRD+
Replied
Happy to help :D
Cancel
Post
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post