SNEX UI Parameters
-
@Straticah I‘m afraid you need a basic understanding of C++ in order to write C++ code :)
In your example you‘re redeclaring a variable within the same scope.
-
@Christoph-Hart Which variable is redeclared? I don't see it? He has scopes around each parameter.
-
@tobante
scriptnode::parameter p, line 69 -
But this is legal:
{ // scope a int p = 42; // ... } { // scope b int p = 43; // ... } -
@tobante Yes but this isn't:
int p = 41; { } int p = 42; -
@Christoph-Hart I'm still confused.
- Function: L59 -L75 (contains 2 nested scopes)
- Scope A: L60 -L65 (contains 1st p)
- Scope B: L68 -L74 (contains 2nd p)
Indentation is a little misleading, but it is valid.
-
@Christoph-Hart I agree that your example is invalid, but that's not what @Straticah has in his example. The error probably is that he uses
dfor the parameter he calleddata. Not sure why the compiler flags line 58. Maybe it's always beginning of function. -
-
haha, now I see it too. That is a contender for worst code formatting ever...
-
@Christoph-Hart I was so confused, because I gave @Straticah the code from your GitHub repo. :)
