ScriptSpot

Forum topic · Scripts Wanted

Strange error message

By igamaximus · 2018-10-17

Description

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

Attachments
Comments (2)

.

jahman · 2018-10-17


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).

Thank you Sergey !

igamaximus · 2018-10-17

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