The name is not visible at the point where Pine compiles it. Check spelling and capitalization, confirm that the identifier is declared before use, and make sure it is not confined to another local scope or renamed in the current Pine version.
What you may be seeing
- The compiler highlights a variable, function or namespace name
- The identifier exists elsewhere in the script but is still not found
- The error appeared after copying code or changing Pine versions
Most likely causes
- The identifier is misspelled or uses different capitalization
- The declaration occurs later or only inside another local scope
- An old function or namespace name is being used in a newer Pine version
Try this first
- Compare the highlighted name character by character with its declaration
- Move or create the declaration before the first use
- Check whether the value is declared only inside an if, loop or function
- Verify migrated built-ins and namespaces in the current reference
If that didn’t fix it
- Pass a local value into a function explicitly
- Declare a persistent variable in the appropriate outer scope
- Replace an obsolete built-in with its documented current name
Verify the fix
Save the script and confirm the compiler no longer reports the identifier error, then verify the variable still has the intended lifetime and value.
Why this happens
The name is not visible at the point where Pine compiles it. Check spelling and capitalization, confirm that the identifier is declared before use, and make sure it is not confined to another local scope or renamed in the current Pine version.
Pine is case-sensitive and local variables do not automatically exist outside their block. When migrating a script, also verify renamed namespaces and functions against the current reference.