English Text Console v2 icon

5 comments
16.05.12 11:27:15 am
like 4 like it!
2 kb, 89 Downloads
MikuAuahDark
User
Offline Off
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
ok This file has been reviewed and approved by Seekay (04.12.15 01:10:45 pm)

Comments

5 comments
Goto Page
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in
19.04.14 04:12:26 am
like I like it!
Up
Ashley
BANNED
Offline Off
I agree with @user Avo:
it's a nice idea

also i like this part :

Code:
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
24.05.12 12:24:54 am
like I like it!
Up
Avo
User
Offline Off
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.
Code:
1
2
iluminati = {}
iluminat.loop = 10
Just saying.
edited 1×, last 04.06.13 05:29:54 pm
16.05.12 11:41:33 pm
Up
PyKemis
User
Offline Off
Ah but this has 32 lines and returns error in the console and the text file if it fails:

Code:
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
16.05.12 12:06:08 pm
like I like it!
Up
4Vendetta
User
Offline Off
Not Bad
16.05.12 11:32:06 am
like I like it!
Up
Frozen-Leonz
User
Offline Off
Fix Your Typing (and Grammar)
To the start Previous 1 Next To the start