Fix MAXScript Error in 3ds Max: Troubleshooting & Solutions

“MAXScript MacroScript Error Exception — Type error: Call needs function or class, got: undefined” when opening 3ds Max

MAXScript Error in 3ds Max: Troubleshooting Guide

Encountering a MAXScript error when opening 3ds Max can be frustrating. This guide provides solutions to address the “MAXScript MacroScript Error Exception” and related issues.

Image: MAXScript error widow.
Image: MAXScript error widow.

Understanding the Error: MAXScript MacroScript Error Exception

--Type error: Call needs function or class, got: undefined

This error often indicates a problem with the scripts loaded during 3ds Max startup. It can also manifest in the MAXScript Editor, displaying errors.

Image: MAXScript Editor with VRay errors displayed.
Image: MAXScript Editor with VRay errors displayed.

Identifying the Issue: MAXScript Editor Window

"macroScript VRayViewportIPR
category: "VRay"
buttontext: "V-Ray IPR"
tooltip: "V-Ray Viewport IPR"

(
on isVisible do ( vrayViewportIPRControl 0 0 )
on isEnabled do ( vrayViewportIPRControl 0 1 )
on isChecked do ( vrayViewportIPRControl 0 2 )
on Execute do ( vrayViewportIPRControl 0 3 )
)"

If multiple errors occur, a “Maximum Nested Error Dialog Depth Reached” error may also appear.

Image: Multiple errors result in the nested error window.
Image: Multiple errors result in the nested error window.

Maximum Nested Error Dialog Depth Reached

Attempt to display more then maximum number of
simultaneous error message dialogs occurred.
See error log file for additional error messages

These issues frequently stem from corrupted plugin installations.

Image: Corrupted RailClone install.
Image: Corrupted RailClone install.

Common Causes

The primary cause is a corrupted plugin installation, which can affect functionality and trigger script errors.

Troubleshooting Steps: Solutions

Here’s a comprehensive approach to resolving these errors. The optimal solution might involve one or a combination of the steps below:

  • V-Ray: Start by performing a clean reinstall of V-Ray.
  • RailClone: A clean reinstall of RailClone is the answer.

If the errors persist, a clean uninstall of 3ds Max might be necessary.

Further Reading

  • How To Export Redway RED Files From 3ds Max
  • How To Render Point Clouds In 3ds Max 2018 And More Recent Versions
Fix MAXScript Error in 3ds Max: Troubleshooting & Solutions