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 .
You are not logged in. Please login or register.
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 .
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
It helps alot , thank you , thank you , thank you.
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.