Having trouble with this script


#1

Good mornig all,

I am new at this stuff. Im going to school for game programing. I have taken several classes in 3ds max 2011 and want to try my hand at doing some maxscrpting. Let me get to the point, i downloaded this script to make sprite sheets for me in max for a game im working on. but when i go to run the script i get a runtime error before the script even runs. here is the error:

–Runtime error: FileStream cannot create:C:\Program Files\Autodesk\3ds Max 2011\scripts\SpriteRenderv0.7readme.html

from my programing classes i know that this is trying to create a readme file. I have no experence at all in maxscript, and actuley dont even know what language it is using. so that being said, does anyone know how i can solve this problem. Is it a version issuse? it was made with max8 so im sure it will work for 2011 software.

anyhelp would be great, Thanks


#2

This is the code im guessing that is trying to create the readme file

global readmefile = scriptsPath + “SpriteRender” + script_version + “readme.html”


#3

I’m not a Max guy, but whenever writing to disk it’s good to check if that directory exists and is writable first. Can you make a txt file in that directory?


#4

there are a lot of maxscript guys here. Posting the whole script may help. (or at least where your making the write call.)

my guess is that your are trying to write into the “Program Files” directory. On certain windows operating systems, you need admin rights to write into that directory.


#5

Unless you’ve set the UAC to minimum for the user, you are in a world of pain trying to write anything in Program Files. Shadow copies of files appear automatically in the users’s home directory and all other kind of madness.

On Windows 7 you can find UAC from:
Control Panel / Action Center / Change User Account Control settings

SamiV.