[Hurry!!!] When I try to run script in 3ds max, it says"syntax error: at bad, expected <factor>“, even after I have restored factory settings as the official website guides.

[Hurry!!!] When I try to run script in 3ds max, it says"syntax error: at bad, expected <factor>“, even after I have restored factory settings as the official website guides.

kuromi1999
Participant Participant
858 Views
9 Replies
Message 1 of 10

[Hurry!!!] When I try to run script in 3ds max, it says"syntax error: at bad, expected <factor>“, even after I have restored factory settings as the official website guides.

kuromi1999
Participant
Participant

[Hurry!!!] When I try to run script in 3ds max, it says"syntax error: at bad, expected <factor>“, even after I have restored factory settings as the official website guides. The script is written in the 3D Studio MAX Macro Language. 

kuromi1999_0-1663765848044.png

 

0 Likes
859 Views
9 Replies
Replies (9)
Message 2 of 10

Swordslayer
Advisor
Advisor

You have lots of invalid characters instead of quotes and the path placeholders inside those quotes would have to be valid paths for this to work.

0 Likes
Message 3 of 10

kuromi1999
Participant
Participant

Oh thanks!!!!

Could you tell me what I should fill in at"%%%"or"%\n"?

Because I don't know much about maxscript, and I have this code from an article, which means to extract 3-D(x, y, z) position data of 15 key virtual joints. I could show you part of the article.

1.PNGFigure 3CFigure 3CAppendix BAppendix B4.PNG

0 Likes
Message 4 of 10

Swordslayer
Advisor
Advisor

It's not what's inside the quotes that's wrong, it's the quotes themselves, you should use simple ASCII quotes ie "

 

And you need to replace "CSM file" with the path to the motion capture file and "output file" with the output file path.

0 Likes
Message 5 of 10

kuromi1999
Participant
Participant

I followed your instructions, but it still didn't seem to work. And I'm not sure if I have mistaken the output file path Is the output file path an existing file or just a folder path? Could you help me find out what's wrong? Thank you so much!!!!

(When I clicked"run script", nothing happened.)

 

1.PNG

0 Likes
Message 6 of 10

Swordslayer
Advisor
Advisor

It's a macro script, it creates action you can bind to hotkeys etc. If you just want to run it as a script, remove the macroScript PtOut line.

0 Likes
Message 7 of 10

kuromi1999
Participant
Participant

But I think the author seems to mean to run it as a macro script. Maybe I made a mistake. What should I do if I want to run it as a macro script?

0 Likes
Message 8 of 10

Swordslayer
Advisor
Advisor

Macroscript is same as script you can run any script as macroscript and vice versa (with minor adjustments like removing the macroscript headers), only it's not run outright but you have to first bind it to a shortcut or menutiem. If you just want to run it and don't intend on binding it to a shortcut or menuitem, remove the macroscript line and just run it...

0 Likes
Message 9 of 10

kuromi1999
Participant
Participant

Oh thanks, it works. But after I delete the line"macroscript xxx", it still doesn't extract or output the 3-D(x, y, z) position data I need as the author says...

0 Likes
Message 10 of 10

kuromi1999
Participant
Participant

If I only want the coordinate points I selected to be displayed, and do not need other parts of the Mocap, what format do I need to output?

0 Likes