Lua Console can not use lua key word require?

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
Rinstein
Posts: 4
Joined: Fri Aug 21, 2020 4:35 am

Lua Console can not use lua key word require?

Post 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)
Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

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

Post by Rory Noonan »

ScenEdit_RunScript() does the same thing
Image
Rinstein
Posts: 4
Joined: Fri Aug 21, 2020 4:35 am

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

Post by Rinstein »

yeah,that's true
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

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

Post by KnightHawk75 »

all keywords that relate to io or interaction with the system are removed for safety concerns in non-pro versions.
jkgarner
Posts: 175
Joined: Thu Apr 30, 2020 12:42 pm

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

Post 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.





Post Reply

Return to “Lua Legion”