Jump to content

Why is Require considered unsafe?


Recommended Posts

I want to separate my script sources into a neatly packaged.. package so everything is easily readable.

When I use require "foo/bar.lua" I receive:

ERROR: server_main.lua:1: Unsafe function was called.

I'm just curious as to why I cannot use require for a server side script.

Link to comment
You can do the same with meta.xml. Require would let you load a file from an arbitrary path.

Wouldn't variable data be lost in the process, though? I mainly want to throw all of my variables / tables / arrays / what not in a secondary file and label it as an include.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...