Posted 31 May 2014 - 03:32 PM
Hello community,
I'm working on a "class loading" thingy recently and it wont save what is in the function environment… :(/>
I don't get any real error, but nothing is added to the environment, but if I add for example a log function I can use it in my "class". Sorry if it's unclear what I want to say.
Here are the two files:
Loader.lua : http://pastebin.com/j6x3CT2a
The "class" for testing: http://pastebin.com/aZA1zv06
expected output:
output I get:
It would be amazing if someone could help me with that ^_^/>
~Freack100
I'm working on a "class loading" thingy recently and it wont save what is in the function environment… :(/>
I don't get any real error, but nothing is added to the environment, but if I add for example a log function I can use it in my "class". Sorry if it's unclear what I want to say.
Here are the two files:
Loader.lua : http://pastebin.com/j6x3CT2a
The "class" for testing: http://pastebin.com/aZA1zv06
expected output:
loading fields of test
test has 3 fields
test = lol
func = function--some random stuff here
numb = 1
output I get:
loading fields of test
test has 0 fields
It would be amazing if someone could help me with that ^_^/>
~Freack100