Forum

> > CS2D > Scripts > how to create a LUA file?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch how to create a LUA file?

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt how to create a LUA file?

Agustindz23
User Off Offline

Zitieren
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 Kommentar

Added spoilers. /Starkkz

alt Re: how to create a LUA file?

alex72super
User Off Offline

Zitieren
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

alt Re: how to create a LUA file?

MikuAuahDark
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht