Hi Andre,
Here are sample scripts using <zscriptinsert> command:
ScriptA.txt:
// ScriptA.txt
[IButton,"script test","inserts ScriptB.txt in ScriptA.txt",
[Note,"\C00d000This is ScriptA.txt"]
<zscriptinsert,ScriptB.txt> // this loads the second script
[Note,"\C0000d0This is ScriptA.txt again",,2]
]
and ScriptB.txt:
// ScriptB.txt
[Note,"\Cd00000 Now this is ScriptB.txt"]
Sven
[edit: Here’s a tip… When you are working on a zscript, ZBrush tries to help you understand exactly where your zscript is broken.
When you test your zscript and it doesn’t run, ZBrush tries to show you the first line where it thinks the problem is. It shows you an error message which first lists the partial line of code it is having trouble with, then shows the entire line (and sometimes surrounding lines) where the problem code was found. If you scroll through the code in the ZScript window (beyond the problem command) the color-coded text usually turns black.
Use this informantion from ZBrush to review your own zscript text to see if your can correct the syntax.
Sometimes the error ZBrush shows isn’t the real problem. You may have a missing bracket or wrong punctuation somewhere else.
So. Start debugging by looking at the place in your zscript that ZBrush suggests is wrong. Then gradually expand your search, looking at code directly before and directly after that place in your zscript and eventually you will find the problem.]