You should not use LOCAL in scripts or templates because those are actually translated into PRIVATEs. This is necessary for the code to run in CodeBlock since it won't be able to see LOCALs between the parsing of the function.
LOCAL ARRAY will definitiely fail because there's no such thing as PRIVATE ARRAY, so just don't use LOCAL on arrays.
+++ Rick ---
>In a template, I have the following code:
>
>
>< % ERROR:
>LOCAL lcHtml,lnLength
>lnLength=5
>IF glSysop
> lnLength=11
>ENDIF
>LOCAL ARRAY laMenu[lnLength,2]
>lcHtml=''
>...
>RETURN lcHtml
> % >
>
>
>However, if I do this:
>
>
>< % ERROR:
>LOCAL lcHtml
>IF glSysop
> LOCAL ARRAY laMenu[11,2]
> ELSE
> LOCAL ARRAY laMenu[5,2]
>ENDIF
>lcHtml=''
>...
>RETURN lcHtml
> % >
>
>
>it never works. Anyone know why?