Archive: nsisArray usage insude function


nsisArray usage insude function
I'm sorry I'm really looking at a steep learning curve :D
What do I need to change to make it possible to push a value on the array inside a function. My code roughly looks like:

!include NSISArray.nsh

${Array} "TestArray"

Section "Dummy Section" SecDummy

${TestArray->Init}
Call TestFunction
${TestArray->Debug} ; Show the array after the changes
${TestArray->Delete}
${ArrayUnload}

SectionEnd


Function TestFunction
ClearErrors
; function uses all R0..R8
; logic here...
${TestArray->push} "$R6"
FunctionEnd

There's nothing wrong with your function code.
${TestArray->Delete} deletes compile-time references to an array, so if you try to use any array instructions further down in your script after calling ${TestArray->Delete} then you will get a compile error.
In other words, comment out ${TestArray->Delete}.

-Stu