New lines creating unwanted spaces

I’ve got a question: Is there a way to stop the insertion of a space between two different lines?
Example of what I mean:
red rum
outputs: red rum
Is there a way to make it output: redrum?

The main problem I’m actually running into is with *if commands. An example of the problem I’m having:
*set color_contradiction true ...blah blah blah... The wine *if color_contradiction , however, is red.
Output: …blah blah blah… The wine , however, is red.
Notice the extra space around ----^ here.

Anyone know a way to get rid of that?

I am not a programer but why not put
The wine,
*if color_contradiction
however,
is red.

Hope this helps.

Because then if color_contradiction =/= true the output is: “The wine, is red.” It adds an extra comma that way.

Edit: Also, I’m working on an ingame clock right now, and it keeps adding spaces between the numbers if I use *if commands. I’ve nearly eliminated the need for if commands in the middle of the clock, but no matter what I try, I can’t get double zeros to display properly.

When I look at your code I can see that the extra space is actually included in your code. You have “(space),(space)however,” in your code.

@Blade That’s because the *if command has to be indented.

@reaperoa Well since it seems to be a problem with the syntax of the script language, then I suggest that you do something like this…

*set color_con true
…Blah blah blah…

*if color_con
The wine, however, is red!
*else
The wine is red!

…Blah bleh bleh…

I know it’s more of a pain but at least it works.

@Blade True, and that is how I fixed some of the problems (most I fixed by altering the sentences altogether). Another way I found to fix the problem (which was more useful in cases involving numbers, such as the ingame clock I am working on) was something like this:
*set color_con true *if color_con *set sentence123 ", however, " *if color_con = false *set sentence123 " " ...blah... The wine${sentence123}is red.
(Note: I didn’t check if this actually works right, it’s just a close approximation to what I did with my clock… after I figured out that I had typed in the wrong variable for the umteenth time).

So, yea, I’ve figured out about three work arounds:

  1. Reword the sentence.
  2. Have *if commands control more than they otherwise need to, so as to cause the *if command to no longer need to start with a character other than space.
  3. Turn what you want to be alterable into a variable, and have an *if command change the variable just before it shows up.

In any case, the still leaves the question: Does anyone know if it possible to stop that space from showing up? (At this point it is less a question of need, and more of idle curiosity, so unless you have something particularly interesting and relevant to state, no need to tell me another work around.)

@Reaperoa: I’m pernickety enough to have been bothered by the same thing, and if there’s a space-removal fix, I haven’t figured it out. So I’ve been using your workarounds 1 and 2. In particular I’ve found it helpful to use spaced dashes where I might otherwise have used commas.

Two examples from my game in progress. The first is a bit of dialogue that changes depending on what “raids” you’ve already chosen to send your rebel bandits on, and the second is a description that changes if you suspect there may be a traitor in your band. They work if you’re stylistically happy to have spaces around your dashes.

`
“We didn’t start this rebellion so we could hide out in the hills and raid
*if caravan
merchant caravans, or
*if temple
corrupt priests, or
the aristocracy’s winter grain barns
*if noble
or even helot-killing nobles like the de Merre
– we’re here to bring down the Empire.”

It’s not easy to find suitably vulnerable targets
*if traitor
– especially when you can’t send anyone who might be a traitor on reconnaissance –
and your band soon spends more time searching than raiding.
`

1 Like

I’m having the same problem, and since it’s been 14 years since the last post on this subject, I thought it was worth opening it up again!

My code example is below. Is there any way to stop CS from automatically inserting a space in front of the full stop?

    The final item you packed was your
    *gosub_scene seachest ReadLatest
    .
    *line_break

I’m having a similar problem with, for example:

${she/he/they}@{singular ‘s|’re}. It adds a space before the apostrophe. Obviously I can re-word this quite easily, but I do like to minimise typing!

1 Like

I’m afraid that ChoiceScript is structured to minimize spacing errors rather than minimizing typing. There’s no way around the problem you note other than some extra typing or sentence restructuring, e.g.

Your
*gosub_scene seachest ReadLatest
was the final item you packed.

or

@{singular ${she/he/they}'s|${she/he/they}'re}

(Would it be too cheeky to suggest that if you really want to minimize typing, ${they} is a lot shorter than ${she/he/they}?) :slight_smile:

I should also note for the record that my “solution” from 14 years ago didn’t survive contact with CoG’s style manual, which requires no spaces around dashes.

Well, having done some more thorough proofreading, I have at least established that the reason for the apostrophe-extra-space errors was that I was actually typing ${she/he/they} space @{singular ‘s|’re}! So that one is fine.

I don’t actually type “he/she/they”, of course! I type the first initial of the character with the variable gender, then the pronoun type, which is set in my startup file. I really do like to type as few coding words as possible!

Re the other problem: yes, I’ll just rephrase as you suggest - thanks!

1 Like