Topic: dofile function

Hello , can some one please explain to me how to use the dofile function.
I followed the example on the wiki but the script doesn't load .

Re: dofile function

Let's say you have 2 script in the same folder :
script_A.lua
script_B.lua

In your script_A, put at the top :

dofile("script_B.lua")

Then if you have a function in script_B :

function Whatever()
    --dosomethinghere
end

Use it like that in script_A :

function onSceneUpdate()
    Whatever() -- function from script_B
end

Hope it helps

Re: dofile function

It helps alot , thank you , thank you , thank you.