How to set stats

I wanted to know if my code was right for when the player makes a choice that it would affect one of the stats. I’ve gotten the error messages of Invalid expression; expected name, found OPERATOR at char 1 or Invalid expression, couldn’t extract another token

Pick a favourite subject
		*set +20 booksmart

You’ll want

*set booksmart + 20

I believe.

1 Like

@catorrina has it. The error is that you’re attempting to add the value to the left of the + to the value to the right and there’s no value to the left. The computer knows *set can’t be a value so it doesn’t try treating it like one.

The error messages all translate to “the thing here does not make any sense”; they’re various possible reasons why it’s not what you mean depending on what you mean.

1 Like