SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.


SM Forums / Maya Questions / Maya Technical Issues / MEL - Syntax error

Maya Technical Issues Post all your interface and configuration related problems with Maya software here.

Join the conversation. Reply to post
 
Thread Tools
28-02-2013, 02:53 PM   #1
IrenaDee
Registered User
 
Join Date: Feb 2013
Posts: 7
MEL - Syntax error
Hi, I'm completely new at maya and mel so bare with me

When I try to call up the script it says: Error: D:/MyMelScripts/test.mel line 1.6: Syntax error
I understand from other posts I read, that I could be writing something wrong so here's my
spelling: source test.mel

The MyMelScripts folder was created by me, while the default was C:\Users\Irena\Documents\maya\2013\prefs\ScriptEdi torTemp - which I found weird but I first tried to call up my test.mel script from there, it came with the same syntax error. Which is why I added a MAYA_SCRIPT_PATH = D:\MyMelScripts to the env file to try and do the same thing from another folder.

When I open File>Source script from Script editor it still takes me to the default location.
I found in the ScriptEditorTemp two files named CommandExecuter and CommandExecuter-0. I don't know if that means anything.
  Reply with quote
28-02-2013, 03:41 PM   #2
Gen
Super Moderator
 
Gen's Avatar
 
Join Date: Dec 2006
Location: South FL
Posts: 3,518
Could you post the first line of the script?
__________________
- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
  Reply with quote
28-02-2013, 03:43 PM   #3
IrenaDee
Registered User
 
Join Date: Feb 2013
Posts: 7
I was just testing how to save scripts so I just wrote
"sphere"

And that's my entire script.

Edit: Okay, I'm a bit slow, sorry. If it's just sphere then it doesn't work, but I just tried adding move (and some values) to the script and it works fine, though it still works from the ScriptEditorTemp and not the path I added in .env file... but that's ok as long as I can save scripts at all.
Thanks for the help

Edit2: lol, I spoke too soon. What I failed to realize is that if the script is saved in that folder it disappears after maya restarts or if I type in rehash command. :S I'm still getting the same error if I type in the source test.mel - even with the values I added (I actually just copied from the script editor window the values that appeared after I moved the sphere with move tool)

Edit3: I've found my mistake It was a syntax error, in the .env file I put: \ instead of this: /
*feels like a proper newbee* :S

Last edited by IrenaDee; 28-02-2013 at 04:15 PM.
  Reply with quote
28-02-2013, 04:15 PM   #4
stwert
EduSciVis-er
 
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
It sounds like the syntax error is related to your script, not how you're calling it.
"sphere;" would be the proper command.
  Reply with quote
28-02-2013, 04:19 PM   #5
IrenaDee
Registered User
 
Join Date: Feb 2013
Posts: 7
Quote:
It sounds like the syntax error is related to your script, not how you're calling it.
"sphere;" would be the proper command.
lol, you're right. Found the error in the spelling when I put the new path in the .env file, still thank you for answering
  Reply with quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Reading File... HELP ME PLEASE roryfollansbee Challenge Forum 1 16-04-2016 09:00 AM
trouble opening maya scene jooleyinboots Maya Technical Issues 2 03-02-2014 09:11 PM
Quick way to duplicate/scale concentric walls? Steve555 Maya Basics & Newbie Lounge 8 08-12-2005 02:42 PM
ChannelBoxCustomizer error. onlooker Programming 3 26-03-2004 03:47 PM
Syntax Error, please help DezFX Programming 2 17-01-2004 08:34 AM