Forum

> > CS2D > Scripts > Script error (concatenating texts)
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Script error (concatenating texts)

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Script error (concatenating texts)

I3I3
BANNED Off Offline

Zitieren
Can you please find the error in this script line ?

1
point[arg1]+""..txt:sub(7,100)..""

My script work when i remove it and won't work when i add it
so i though the error is this line
please how can i fix it

alt Re: Script error (concatenating texts)

DC
Admin Off Offline

Zitieren
Also it's very important to note that whenever you see something like
X..""..Y
or
X..''..Y
(with X and Y being ANYTHING) it's a POINTLESS operation written by someone who didn't know what he's doing.

You are concatenating an EMPTY STRING. This changes NOTHING.
so
X..""..Y
is equal to
X..Y

and
X..''..Y
is equal to
X..Y
as well.

In math the equivalent operations to
X..""
would be
X+0
,
X-0
,
X*1
or
X/1
. It's neutral. It doesn't change anything. It only wastes performance. So why do you do it? Don't do it.
1× editiert, zuletzt 19.06.17 19:20:20
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht