About this site
ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Comments
.
Thanks. I saved this code as
Thanks.
I saved this code as a .ms
all_lines = (dotnetclass "system.io.file").readalllines @"d:\test2.txt"
csv_separator_char = ","
data = filterString all_lines[ 1 + currentTime as integer ] csv_separator_char
label_1 = data[1]
label_2 = data[2]
and saved a .txt file with 3 lines of data
hello,2
big,3ab
n2,5sb
but I am getting this error when I run it:
#("hello,2", "big,3ab", "n2,5sb")
","
-- Error occurred in anonymous codeblock; filename: C:\max-scripts\text.ms; position: 231; line: 4
-- Type error: FilterString [String to filter] [Tokens] requires String, got: undefined
-- MAXScript callstack:
-- thread data: threadID:19036
.
try to replace currentTime with sliderTime and see if it works
.
you have to know maxscript a little to use this code
-- Type error: FilterString [String to filter] [Tokens] requires String, got: undefined
filerString expects string value, but all_lines array probably doesn't contain string for this frame so 'all_lines[ 1 + currentTime as integer ]' is equal to undefined