Problem with scripts

Got a problem you cannot solve? Try here.
Post Reply
mikKummerfeld
Posts: 252
Joined: Sat Dec 03, 2011 3:07 am
Location: Konstanz, Germany
Contact:

Problem with scripts

Post by mikKummerfeld »

Hey Guys,

how can I solve this problem:

I have a script with an insert script command. In this calling script there is a label at the start e.g ":label begin".
When I call this script in my main script more than one it does not work.

How would you solve that? I dont want to copy this script 30 times to be able to call it 30 times

Thanks...
Kind regards

Heiko Kummerfeld
MIK GmbH

Setup developer for .NET BI Software (12 products)
Head of quality assurance
technical consultant
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Problem with scripts

Post by FrancescoT »

Dear Heiko,

How do you call the script?
Are you using the "include Script" statement each time you need it in your main script?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
mikKummerfeld
Posts: 252
Joined: Sat Dec 03, 2011 3:07 am
Location: Konstanz, Germany
Contact:

Re: Problem with scripts

Post by mikKummerfeld »

Yes of course I do...is there a better way doing this ????
Kind regards

Heiko Kummerfeld
MIK GmbH

Setup developer for .NET BI Software (12 products)
Head of quality assurance
technical consultant
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Problem with scripts

Post by FrancescoT »

No, there isn't.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
mikKummerfeld
Posts: 252
Joined: Sat Dec 03, 2011 3:07 am
Location: Konstanz, Germany
Contact:

Re: Problem with scripts

Post by mikKummerfeld »

Bad... !

So do I really have to duplicate my script 30 times to call it 30 times ???

Like ImportScript, ImportScript02, ImportScript03....???
Kind regards

Heiko Kummerfeld
MIK GmbH

Setup developer for .NET BI Software (12 products)
Head of quality assurance
technical consultant
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Problem with scripts

Post by FrancescoT »

... you only have to duplicate the Import Script statement ... not the script file inclusion itself.

Honestly, I don't understand your comment ... it is the same if you need to call a fuction 30 times with any Code editor. isn't it?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
mikKummerfeld
Posts: 252
Joined: Sat Dec 03, 2011 3:07 am
Location: Konstanz, Germany
Contact:

Re: Problem with scripts

Post by mikKummerfeld »

no it does not work...I cant include a script multiple times because I have a Label in the script with goto labels inside this script and there Comes a ERROR MESSAGE while building...
The Compiler "thinks", that I have "my Label" multiple times, because I insert the same script more than one..

SEEMS A BUG !

1. Create a script like this

:Label
...
goto Label

2. insert this script in main script 2 times
3. Build => BÄÄÄM
Kind regards

Heiko Kummerfeld
MIK GmbH

Setup developer for .NET BI Software (12 products)
Head of quality assurance
technical consultant
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Problem with scripts

Post by FrancescoT »

Dear Heiko,

it is not a bug ... it is simply because you can't use a label statement as you are doing.

You must keep in mind that a script ... it is not a function ... and due of this, you should use labels within your main script only or include your script one time only.

Otherwise a "multiple label declaration" error is returned

Hope this clarify your doubt.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply