How to set the “Require” path when embedded in Lua?

I embedded lua in the directory structure of my game engine and lua files, and I started to use a lot of lua scripts. I want to use “requrie” to optimize module inclusion, but I don’t Determine how to set the CPATH and PATH values, because I have embedded lua. How do I set it?

Also, since I need to find the module instead of the path, can I use * to view all subfolders of the folder and view each lua file? And can lua module files be “compiled” with structures?

Thank you!

You can set package.cpath and package.path. Wildcards are not supported in the path.

I embedded lua in the directory structure of my game engine and lua files, and I started to use a lot of lua scripts. I want to use “requrie” to optimize module inclusion, but I am not sure how to set it up CPATH and PATH values, because I have embedded lua. How do I set it?

Also, since I need to find the module instead of the path, can I use * to view all subfolders of the folder and view each lua file? And can lua module files be “compiled” with structures?

Thank you!

You can set package.cpath and package.path. Wildcards are not supported in the path.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3273 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.