Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS4003

error An exported function cannot use input.*.

#What it means

A function a library exports may not create inputs (input.*), because inputs belong to the script that is added to the chart. Pass the value in as a parameter instead.

#Typical cause

  • An exported function that calls input.int or another input function.

#How to fix it

Create the input in the indicator that uses the library and pass its value to the function.

#Example

In the current version an input inside any function is already reported as CS3007, which comes first.

  • CS3007 — name can only be used at the top level of the script, not inside a condition, loop or function.
  • CS4005 — export can only be used in a library.

The ChartScript documentation is in English for now; translations will follow.