Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

setter link problem

Hello,

I'm currently trying to create a link that put 1 to the PC traits while subtracting the same amount from the pool of points.
the link seems to work but when i click it, it shows an error (see the attached file).

Here is the link with the setters
[[ [1]|pcCreation][set $pcTrait to 1; set $pcTraitPoints =- 1]]

I'm pretty sure my link is correct, I don't know what's wrong can someone help me?

Using twine 1.4.2 with sugarcube and the same error happens in SC1 and 2

Comments

  • I can't check right now, but I'm guessing off the top of my head that the brackets around the '1' are causing the issue. Take them out and test.

    If that's the issue, you can put them in there, but they will need to be surrounded by either quotes or single quotes; forget the syntax off the top of my head. Sorry. I'll check back later when on a computer with Twine.
  • You don't include the set keyword in Setter markup links, they have the following format:
    [[link text|target passage title][$variable to "value"]]
    
    eg.
    [[1|pcCreation][$pcTrait to 1; $pcTraitPoints =- 1]]
    
  • Thank you @greyelf

    it's not even the first time I use setter link but i didn't saw that simple mistake :(
    but it works now

    @Sharpe

    Had already tried that and it changed nothing still I knew there was something wrong since the brackets didn't appeared in game.
    I've put quotes and they appear, thank you
Sign In or Register to comment.