Page 1 of 1

Lua Console can not use lua key word require?

Posted: Fri Aug 21, 2020 4:38 am
by Rinstein
I found that Lua Console can not use lua basic key word require?
report this ERROR:
ERROR: [string "Console"]:1: attempt to call global 'require' (a nil value)

RE: Lua Console can not use lua key word require?

Posted: Fri Aug 21, 2020 5:17 am
by Rory Noonan
ScenEdit_RunScript() does the same thing

RE: Lua Console can not use lua key word require?

Posted: Fri Aug 21, 2020 6:13 am
by Rinstein
yeah,that's true

RE: Lua Console can not use lua key word require?

Posted: Fri Aug 21, 2020 7:37 am
by KnightHawk75
all keywords that relate to io or interaction with the system are removed for safety concerns in non-pro versions.

RE: Lua Console can not use lua key word require?

Posted: Wed Aug 26, 2020 11:07 am
by jkgarner
It does not really do the same thing. [:-]

ScenEdit_RunScript will ONLY execute a Lua script (which can not have require or the other key words either)

require will run s script, or load a dll, or other module, based on what it finds on the system.

You need to keep this in mind when building your scripts.