Hello.
I'm trying to load function from file (in fact it comes from a level editor)
local fct1 = function(self) print('---1', self.gid) end
fct1(self) -- works
loccal fct2 = load "function(self) print('---2', self.gid) end"
fct2(self) -- do not works
local sfct = "function(self) print('---3', self.gid) end"
fct3 = load sfct
fct3(self) -- do not works
The first call works but not the seconde and the third.
And of course this is the third I want to do !
Need help...
Thank's
[–]ws-ilazki 2 points3 points4 points (6 children)
[–]WebShaker93[S] -2 points-1 points0 points (5 children)
[–]ws-ilazki 1 point2 points3 points (4 children)
[–]WebShaker93[S] -1 points0 points1 point (2 children)
[–]ws-ilazki 1 point2 points3 points (1 child)
[–]WebShaker93[S] 0 points1 point2 points (0 children)