ScriptSpot

Forum topic · General Scripting

3ds Max 2012 createFile error

By Marius Silaghi · 2011-04-14

Description

If I create a maxscript file with maxscript like this

  • f = createFile "C:\a.ms"
  • close f

and if I drag and drop the file "a.ms" into max, max will crash.This doesn't happen in max 2011

Also I can't delete the file until I close max 2012 because it says that it is open in 3ds max.

can somebody explain why this is happening in 2012 and how to fix it

thanks.

Comments (5)

miauu · 2013-05-29

I also found that maxscript can't create file in c:\, but it can create files in c:\folder_name\. Don't know why.

Syphorlate · 2013-05-29

I use dot net streamwriter and streamreader to circumvent this problem. It seems in every max version there's a different bug going on with the openfile/createfile functions.

Graph · 2011-05-23

did you try flushing? works for toilets ;)