Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you print without leaving spaces?

Asked by 4 years ago

I'm trying to print without leaving spaces, for example:

print(player, "has been killed by" ,killer,".") --> John Doe has been killed by Jane Doe .

The fullstop at the end shouldn't be spaced out from the name of the killer so I want to know how to stop spaces. So I want it to be:

--> John Doe has been killed by Jane Doe.
0
i don't see why this matters AlphaFlame5 -1 — 4y
0
i have mild ocd ok. ScaleisRed 58 — 4y

2 answers

Log in to vote
1
Answered by 4 years ago

you could add(concatenate) the strings together using two periods (..) for example:

print("Jane".."Doe") --> JaneDoe

0
Tried this before but it didn't work and my scripts stop working so I changed it back to the commas. Thanks though! ScaleisRed 58 — 4y
Ad
Log in to vote
1
Answered by 4 years ago

A good way to do this is by concatenating (basically adding string values from elsewhere).

print(player, " has been killed by " .. killer .. '.')
--John doe has been killed by Jane Doe

Remember to add spaces at the end of the string ("John Doe ") so it does look like this "John doehas been killed byJane Doe"

Answer this question