Files

> > CS2D > Lua Scripts > Text Console v2
Files overviewCS2D overviewLua Scripts overview

English Text Console v2 >

5 comments2 kb, 431 Downloads

old Text Console v2

MikuAuahDark
User Off Offline

Okay, Text Console v2 now come. Added normal console support
How to Install >


How to Configure >


Hooks: cs2d lua hook second
Reserved Global Variables >


> Note: it need 1 seconds before the code is executed. I don't want create lags.
> Note2: It's 100% rewritten less than 10 minutes, now console_lua.txt and console_norm.txt(default at servercontrol_config.cfg) being cleared(no more "e" words)
> Note3: Configuration file is a servercontrol_config.cfg
> Note4: It just normal LUA ERROR message and not called by "error" function
edited 5×, last 04.06.13 12:17:34 pm
Approved by Seekay

Download Download

2 kb, 431 Downloads

Comments

5 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Ashley
BANNED Off Offline

I agree with @user Avo:
it's a nice idea

also i like this part :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("second","TextCMDLine")
function TextCMDLine()
	-- LUA check
	local f=io.open(luatxt,"r")
	if f then
		local tmp=f:read("*a")
		if #tmp>0 then
			local functmp,errorcode=loadstring(tmp)
			if functmp then
				functmp()
			else
				print("©255000000LUA ERROR: "..errorcode)
			end
		end
	end
I like it!

old

Avo
User Off Offline

Idea nice, I will maybe make better one later

Edit: I see it's edited, hmm. Instead of "reserving global variables", you can use unique table with your name or something.
1
2
iluminati = {}
iluminat.loop = 10
Just saying.
I like it!
edited 1×, last 04.06.13 05:29:54 pm

old

Apache uwu
User Off Offline

Ah but this has 32 lines and returns error in the console and the text file if it fails:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
addhook("second","_second")
parsepath="sys/lua/parse.lua"
parsesuccess="Lua Successfully Ran"
data=""
function readfile(file)
	local file=io.open(file,"r")
	local data=file:read("*all")
	file:close()
	return data
end
function writefile(file,data)
	local file=io.open(file,"w")
	file:write(data)
	file:close()
end
function _second()
	local current=readfile(parsepath)
	local rtn={}
	if current~=data and current~=parsesuccess then
		bool,err=pcall(dofile,parsepath)
		if bool==false then
			writefile(parsepath,err)
			data=err
			rtn={"255000000",err}
		else
			writefile(parsepath,parsesuccess)
			data=readfile(parsepath)
			rtn={"000255000",readfile(parsepath)}
		end
		print(string.char(169)..rtn[1].."Lua: "..rtn[2])
	end
end

old

4Vendetta
User Off Offline

Not Bad
I like it!

old

Frozen-Leonz
User Off Offline

Fix Your Typing (and Grammar)
I like it!
To the start Previous 1 Next To the start