Development Section > Your Developing Problems

How to use one lua script in another

(1/1)

Pedja:
I guess this is a newbee question, but I am newbie.

I want to make s cript that will contain library of functions. Then I want to load that library in other scripts to use them. I searched through lua documentation, but got no clue how to achive this.

Any help?

bastya_elvtars:
This can be achieved via the modules system.

Dessamator:
Im a bit rusty on this so im not too sure but, something like dofile("script.lua") used to work.

Pedja:
I found out this topic http://forum.ptokax.org/index.php?topic=6173.0 that seems to be explaining it, although not up to the point.

LUA is not as fine script language as I expected it to be.

bastya_elvtars:
That thread is very old. I gave you a hint, if you want me (or anyone else) to be more specific, please ask more specific questions.

Navigation

[0] Message Index

Go to full version