How do I make this conditional statment code block work?

There are a number of problems:

  1. You can’t use a ternary operator in associative DesignScript blocks. You need to declare a Imperative block instead. This applies to any if statement

  2. Ternary operators currently don’t work in Imperative definitions anyway, the bug has been reported on Dynamo GitHub, so you need to use an if statement block instead

  3. You have typo’s. ‘s’ and ‘S’ are two different objects

  4. More typo’s: input2 and 8input2

  5. missing a binary operator here (i assume you meant to multiply hence the typo of ‘8’?): (input1-8)(input2)

Check out the Dynamo DesignScript intro here