karimsqualli96 Posted August 31, 2014 Share Posted August 31, 2014 hi, have 2 file : base.lua, eat.lua in the same resource, i want to call a function add_need that is defined in base.lua from eat.lua, but got an error saying that add_need is global variable that has a nil value, mean that the function isn't recognized in eat.lua how can i export it? Link to comment
xXMADEXx Posted August 31, 2014 Share Posted August 31, 2014 Did you use local to define the function? Link to comment
karimsqualli96 Posted August 31, 2014 Author Share Posted August 31, 2014 oh, shit solved, i had another error in the file base.lua so the file is not parsed that why the function add_need haven't been recognized in eat.lua 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