Forum

> > CS2D > Scripts > how to create a LUA file?
Forums overviewCS2D overview Scripts overviewLog in to reply

English how to create a LUA file?

3 replies
To the start Previous 1 Next To the start

old how to create a LUA file?

Agustindz23
User Off Offline

Quote
Well, the question is how to create a text file common LUA file.
I ask this because I'm creating a RPG_tibia, and I want to add a new monster and the document is saved in another file type.
I hope I help
Spoiler >

Admin/mod comment

Added spoilers. /Starkkz

old Re: how to create a LUA file?

alex72super
User Off Offline

Quote
You want to create a .lua file?

If its that then open notepad and press "Save as..." then choose a name then in the end instead of .txt you put .lua

old Re: how to create a LUA file?

MikuAuahDark
User Off Offline

Quote
You can simply save it as .txt files which would work like another LUA scripts.

Example:

temp.txt
1
2
print("This is txt file")
return "OK"

server.lua
1
print(dofile("sys/lua/temp.txt"))

It would output
1
2
This is txt file
OK
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview