Jump to content




Loading API's into a Specific Enviroment


  • You cannot reply to this topic
2 replies to this topic

#1 クデル

  • Members
  • 349 posts

Posted 29 November 2015 - 02:10 AM

Pretty much as the title says, I cloned _G with:
_env = _G
But my program is running in _G still, so I want to load API's into _env without moving from _G.

#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 29 November 2015 - 02:33 AM

That wont clone _G at all, rather it would make _env a pointer to it.

You could make a custom loadAPI function.

Custom loadAPI

Edited by KingofGamesYami, 29 November 2015 - 02:58 AM.


#3 クデル

  • Members
  • 349 posts

Posted 29 November 2015 - 04:04 AM

Thanks, I decided to just take the easy way out by loading APIs within a function set to use the enviroment. :)





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users