lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thanks a lot for your quick and prompt reply.


Regards,
Yogesh Gaur

Message: 4
Date: Mon, 10 Nov 2008 15:41:19 +0100
From: "Jerome Vuarand" <jerome.vuarand@gmail.com>
Subject: Re: Calling one script inside another
To: "Lua list" <lua@bazar2.conectiva.com.br>
Message-ID:
       <89d273ba0811100641o7ddae57fme0387db1f64f6876@mail.gmail.com">89d273ba0811100641o7ddae57fme0387db1f64f6876@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

2008/11/10 Yogesh Gaur <yogeshgaur.83@gmail.com>:
> Please help me out if any of the fellow users know the way to call one Lua
> script inside the other script.

As Sam Roberts suggested use dofile. For example:

-- init.lua
value = 42
dofile("main.lua")

-- main.lua
print("the value is:", value)



--
www.chotanarad.com