tommymaster Posted July 28, 2018 Share Posted July 28, 2018 Hi. Let me give you an example: local Car = {} function Car:new(model, color1, color2, plate, ...) --create a vehicle --return the created vehicle end If i want to reach this class from an other script, how can i export the class, and not the functions? Link to comment
Addlibs Posted July 28, 2018 Share Posted July 28, 2018 Exports currently do not support this. Workarounds include exporting a function which returns a string of lua code which you can loadstring() to have the class defined within the current resource. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now