- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am getting an error message with the following lines of maxscript and I am hoping someone here can tell me what I am doing wrong:
fdir = GetSavePath caption: "Select Directory for Export" initialDir:(maxFilePath)
--Now store the folder name to use as the name of the combined .fbx
thefolder = filterstring fdir “\”
thefolderName = thefolder[thefolder.count]
The error message is :
-- Type error: FilterString [String to filter] [Tokens] requires String, got: undefined
-- MAXScript callstack:
-- thread data: threadID:12784
-- ------------------------------------------------------
-- [stack level: 0]
-- In top-level
-- Error occurred in anonymous codeblock; filename: C:\Users\Dave\AppData\Local\Autodesk\3dsmax\2020 - 64bit\ENU\usermacros\ExportMultipleObjectsforSP.ms; position: 992; line: 26
-- Syntax error: at bad, expected <factor>
-- In line: thefolder = filterstring fdir “\”
The GetSavePath function works fine and I verified that fdir is in fact storing the file path I select.
I tried adding an extra "\" (i.e., "\\") in case an escape character is required, but that did not work. Same error message. I tried to set another variable called folder_string to make sure it is a character string as follows:
folder_string = fdir as string
and then use that variable in the filterstring line. Again it had no effect. Same error message.
Any guidance would be greatly appreciated.
Solved! Go to Solution.