Unless you intended your self-created attributes to be other than a float (you haven't specified for example what @depression is so it will be a float by default),
I can't see an issue with the code alone. Perhaps upload a simplified version of your file.
Unless you intended your self-created attributes to be other than a float (you haven't specified for example what @depression is so it will be a float by default),
The @depression attribute is a painted attribute to which I want the @restlength attribute to only have a more stronger effect, rather then only the whole object. The painted areas which have a @depression attribute all have values above 0.
The wangler3 node is where the previous code is placed.
The way your code is set up, it affects all primitives on the geometry. You should include a filter for "depression" values above a threshold to affect "restlength". For example: