CS2721
error A script can have at most max what.
#What it means
The settings panel has limits on how many of each thing a script can declare. The message names the limit, for example 8 tabs, 64 sections, 32 presets, 200 named styles, 8 variants per style, 100 checks, 200 migrations or 128 KB of translations.
#Typical cause
- More tabs, sections, presets or other items than the panel allows.
#How to fix it
Combine items: for example use sections inside fewer tabs, or merge similar presets.
#Example
//@chartscript 1
indicator("Tabs")
settings.tab("t1", "One")
settings.tab("t2", "Two")
settings.tab("t3", "Three")
settings.tab("t4", "Four")
settings.tab("t5", "Five")
settings.tab("t6", "Six")
settings.tab("t7", "Seven")
settings.tab("t8", "Eight")
settings.tab("t9", "Nine")
const len = input.int(14, "Length")
plot(ta.sma(close, len))Fixed
//@chartscript 1
indicator("Tabs")
settings.tab("main", "Main")
settings.section("fast", "Fast settings")
const len = input.int(14, "Length")
settings.section("extra", "Extra settings")
const smooth = input.int(3, "Smoothing")
plot(ta.sma(ta.sma(close, len), smooth))