# Invalid @{} variable substitution at letter 1

**URL:** <https://forum.choiceofgames.com/t/invalid-variable-substitution-at-letter-1/73358>\
**Category:** ChoiceScript Help\
**Created:** [February 4, 2020, 6:45am UTC](https://forum.choiceofgames.com/t/invalid-variable-substitution-at-letter-1/73358 "2020-02-04T06:45:00Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Chris\_Conley](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/chris_conley/32/199055_2.png) [@Chris\_Conley](https://forum.choiceofgames.com/u/Chris_Conley)\
**Post date:** [March 15, 2020, 8:55am UTC](https://forum.choiceofgames.com/t/invalid-variable-substitution-at-letter-1/73358/21 "2020-03-15T08:55:55Z")

</div>

> [@dillpickle1996](#):
>
> Here’s what the code looks like
> 
> ```choicescript
> @{romancecaivral He winks at you as he shakes your hand and then joins the others in leaving the castle.|He shakes your hand and then joins the
> other in leaving the castle.}
> 
> ```

Minor note, but I’m all about efficiency: you can reduce this to `He @{romancecaivral winks at you as he|} shakes your hand and then joins the others in leaving the castle.`

You generally want to put as little text as possible within if/else blocks and multireplace, to avoid very hard-to-track-down bugs; in this case, that would mean moving all the duplicated text outside the multireplace.

This fixes a typo you have in one of the lines, for instance.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/choiceofgames/original/3X/e/f/efe1497a762edecdb6d569a1c4abee87508bf002.png) [@system](https://forum.choiceofgames.com/u/system)\
**Post date:** [March 16, 2020, 10:05am UTC](https://forum.choiceofgames.com/t/invalid-variable-substitution-at-letter-1/73358/22 "2020-03-16T10:05:59Z")

</div>

Closed on March 16, 2020, 10:05am UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

[Previous page](https://forum.choiceofgames.com/t/invalid-variable-substitution-at-letter-1/73358.md?page=1)
