What am I doing wrong with this transform script

Have a set of values (var color and size) which I can access with like a print / return function in order to display their current value ( can make it read out "Color: 3" for example)

But I can't get this script to function how I want it. I want to be able to have it display different values depending on which color is selected in the current station but I think I am doing it very wrong.

Again to clarify because I can be a bit bad at putting my thoughts to paper, everything above the if statement works, the rest doesn't work.

See that little red rectangle on the right? That indicates a syntax/formatting problem. The "if" and "elif" and "else" are not indented correctly. Remember in Python, indentation has meaning, unlike most other languages...

Also, it's helpful to hover your cursor over the red "Error_Configuration" which should give a clue as to what is failing.

Also you are missing colons after the if statements.

1 Like

Sorry should've been more descriptive, I've tried indenting it a few different ways already and cant get it to work each way, the message displayed during cursor hover isn't very helpful, even when googling it.
So far I have tried:
image
and
image
and a few other variations

The conditional expressions for if and elif belong on the same line, and the colon is after that. Perhaps you should run through some python tutorials.

(Once you get a squiggly red marker, nothing below that point is even looked at. The problem is right there.)

Post your code formatted with ```. Then we can help a bit better.

Haha I've been trying my best to self educate with python but clearly I am missing some basics. This entire script might not even be the correct way to do this it is simply the way I managed to figure it out. When you say the conditional expressions belong on the same line do you mean it should for example read:

"if color == 3:
(indent)return "3000""

Yep that was it, holy cow what a silly mistake thank you so much