Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How do you print without leaving spaces?

Asked by 6 days 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 -5 — 6d
0
i have mild ocd ok. ScaleisRed 38 — 6d

2 answers

Log in to vote
1
Answered by 6 days 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 38 — 6d
Ad
Log in to vote
1
Answered by 6 days 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