PDA

View Full Version : image loaction inside a string variable - syntax error - oldsyle?


Tolling87
12-16-2011, 10:21 AM
Hi there

Okey so i just started learning MEL. I am now following some of the tutorials from 3d buzz maya fundamental series, where they make a UI for theyre robot. What they do is that they put a location of an image on you're harddrive inside a String Variable. But no matter which way i try to follow i get a syntax error. The Error if ONLY on this code. I was wondering if this isn't possible anymore? The tutorials are from Maya 6.5 so maybe there is a new way to do this. Please let me know

I appreciate all answers, thanks

Azrail
12-16-2011, 11:02 AM
check your slashes:
C:\Foo\ is invalid. You should either escape every backslash like this: C:\\Foo\\, or way better use the unix/maya(normal?) style slashes:

C:/Foo/ - this is valid;

NaughtyNathan
12-16-2011, 11:09 AM
it would help if you gave us the bit of MEL that caused the syntax error, as the problem could be literally absolutely anything. how are we supposed to guess? :)
:nathaN

Tolling87
12-16-2011, 11:29 AM
I have tried every time of slashes and dobbles of them.

Here is the code that gives me a syntax:

string $myLSC "C:\LogoScatterCube.bmp";


I moved it to C:/ drive so the path would be shorter

NaughtyNathan
12-16-2011, 01:25 PM
string $myLSC = "C:/LogoScatterCube.bmp";:nathaN

Tolling87
12-16-2011, 03:36 PM
haha thanks. bad quality on the tutorial..looked like - :p but i should have understood that it must be =. i was so certain that it had something to do with the path hehe. thanks anyways

CGTalk Moderation
12-16-2011, 03:36 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.