English there have something wrong about RGB

9 replies
Goto Page
To the start Previous 1 Next To the start
Up
TobyInChina
User
Offline Off
function startround(mode)
msg('©128255000Round '..game('round')..'@C')
end
for example,I create a msg in game,but abnormal display
IMG:http://cs2dcn.com/data/attachment/forum/201711/09/084311mddpvcoo0v3x9i03.png

How to remove the front A?
09.11.17 02:12:03 am
Up
apex2d
User
Offline Off
here are the Steps
Quote:
for: Notepad++

Spoiler >
Eat Sleep Conquer Repeat. www.Radeon2D.forumid.net
09.11.17 02:39:14 am
Up
TobyInChina
User
Offline Off
@user apex2d: Thank you Very Much,but there also have a wrong.

UTF-8

ANSI
09.11.17 03:17:35 am
Up
sheeL
User
Offline Off
Use
Code:
1
string.char(169)


Code:
1
2
3
function startround(mode)
     msg(string.char(169).."128255000 "..game("round"))
end
09.11.17 06:09:23 am
Up
Mora_rus
User
Offline Off
use
\169

Code:
1
msg("\169255000000Red \169000255000Green \169000000255Blue")

or
example table colours >
09.11.17 06:13:52 am
Up
Masea
Super User
Offline Off
@user Mora_rus:
Code:
1
2
3
local c = COLOUR

Text = c["White"].."white"

That would be shorter.
Create and design your GUI easy and fast: file cs2d GUI Framework (v1.3) (7) | Go deep of the darkness and try your intrepidity: file cs2d Outlast 2 Modification (24)
09.11.17 12:39:12 pm
Up
SQ
Moderator
Offline Off
@user Masea:
Isn't { white = 5 } same as { ["white"] = 5 }?

And then in both cases simply calling

Text = c.white.."white"
IMG:https://image.ibb.co/dPDZoR/asdas.png
09.11.17 02:11:32 pm
Up
TobyInChina
User
Offline Off
@user Masea: @user Mora_rus: @user sheeL: @user SQ: Thank you,I solved the problem!Thank you very much!
09.11.17 03:32:21 pm
Up
Masea
Super User
Offline Off
user SQ has written:
@user Masea:
Isn't { white = 5 } same as { ["white"] = 5 }?
It's not.
Create and design your GUI easy and fast: file cs2d GUI Framework (v1.3) (7) | Go deep of the darkness and try your intrepidity: file cs2d Outlast 2 Modification (24)
09.11.17 04:19:41 pm
Up
SQ
Moderator
Offline Off
@user Masea: It was a rhetorical question. It is.
Code:
1
2
a = {["a"] = 5}
print(a.a)

Even a global valuable is under _G global table.
Code:
1
2
3
myvar = "me"
print(_G.myvar)
print(_G["myvar"])

It's really cool thing and can be used to call functions as a string.
For example:
Code:
1
2
3
myfunc = print
myfunc_name = "myfunc"
_G[myfunc_name]("sample text")
IMG:https://image.ibb.co/dPDZoR/asdas.png
To the start Previous 1 Next To the start