Thread:Extension talk:Score/Problem between Lilypond and Lua

Hello !

I tried to implement a Lua routine in order to get randomly a piece of Lilypond by this way :

And... it doesn't work... I get an error message :

So my question is :

May it be because Lilipond code is parsed before Lua code ? Or another reason ?

And if yes, can one modify this fact ?

And if not, do you know another way of processing ?

Thanks !