Strange error message

Guys and Girls,

can you please share some thought about this weird message i keep getting on this script:
-----------------------
-- Script to reset bump value to 1 for all fR-Architectural materials that are over 1

(
local arrayOfMaterials = getClassInstances fR_Architectural

for eachMaterial in arrayOfMaterials where (eachMaterial.bump_map_amount > 1.0) do
(
eachMaterial.bump_map_amount = 1.0
) -- End for

) -- End scope
-----------------------
Friend of mine created this code to reset all bump values to 1, if these are bigger than 1, but i can't get it to work at all - please check that error in attachment.
What's even more strange, he told me that it works perfectly on his machine, but on my computer i get this error every single time in Max 2012 x64.

What could be the problem here?
Thank you so much for your help

AttachmentSize
fr_arch_bumps.jpg145.17 KB
fr_arch_bumps2.jpg259.71 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jahman's picture

.


That's how any script file saved in newer versions of maxscript editor is looking like. These few symbols in the beginning of the file is the cause of error you're getting. You won't be able to 'Run Script' such .ms files in 2012 (Didn't test any other)

Solution is simple. Copy the contents of the file and save it as .ms file in any text editor you have. Or simply paste it in the maxscript editor of your 2012 max and run (Ctrl + E).

igamaximus's picture

Thank you Sergey !

Thank you once again mate, you have solution for everything. Thanks a lot, again!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.