function test() print(a) end
is a basic function, if I call test() it will print nil. then if I say
setfenv(test,{a="testmessage",print=print})
and call the function again it will print "testmessage" which makes sense however if I saylocal a="defaultmessage"
function test()
print(a)
end
setfenv(test,{a="testmessage",print=print})
and call test() it will print "defaultmessage" when a="testmessage" in that functiondoes anyone know why this is, if it should be like that and if there is a way to correct it?
Edited by KaoS, 16 March 2013 - 06:09 PM.












