PDA

View Full Version : Problem with source


zoc
07-23-2005, 08:42 PM
Hi people...
I have a strange problem.
I have my mel file with a

global proc pippo (){

MyScript

}

If i copy and paste MyScript in script editor, and run it, everything is gone all right.

But if i write this:

source MyMelFile;
pippo;

It doesn't work and the answer is:

// Error: } //
// Error: Syntax error //

Any suggestion?

grazie!

Buexe
07-23-2005, 08:47 PM
I suppose MyScript is something more complex, so check that every { gets a } . what does maya tell you if you just run

source MyMelFile;


Will that already give an error?

zoc
07-23-2005, 08:56 PM
I'm sure MyScript works well... i've made copy and paste and everything works.

it gives me the same error with just:
source MyMelFile;

without run my proc... :(

thanks guy!

DavidA
07-23-2005, 09:03 PM
You have to add quotation marks to your mel script file when you source it:

source "Test.mel";
Test;

Also make sure you have the mel script path set in your environment variables.

David

zoc
07-23-2005, 09:08 PM
i've tried:
source "MyMelFile.mel";

... :( same error!

bruegger
07-23-2005, 09:26 PM
You need a ";" after MyScript.

CGTalk Moderation
07-23-2005, 09:26 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.