Community
3ds Max Forum
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Type error: Call needs function or class, got undefined

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
5354 Views, 2 Replies

Type error: Call needs function or class, got undefined

Hi, whenever I try to run Autodesk 3ds Max 2012 with Gamebryo, and when 3ds Max opens up and I click on an icon such as Gamebryo Export, Gamebryo Preview, etc, I get the error message "Type error: Call needs function or class, got undefined " in Maxscript. For example, for the Gamebryo-ScenePreview.mcr file, that message shows up on the line



    macroscript GamebryoAssetViewer category:"Gamebryo Tools"
    buttonText:"Asset Preview" toolTip:"Launch AssetViewer"
    Icon:#("Gamebryo", 9)
(
    
    DoGamebryoView(1)
)


The DoGamebryoView is used in another file, MiViewUI.cpp as


Value* DoGamebryoView_cf(Value** arg_list, int count)
{
    // check we have 1 arg and that it's a string
    check_arg_count(DoGamebryoView, 1, count);
    type_check(arg_list[0], Integer, _T("DoGamebryoView ViewerType"));
    int iViewerType = arg_list[0]->to_int();

    bool bViewSelected = false;

    MiViewerPlugin::View((MiViewerPlugin::ViewerType) iViewerType,
        bViewSelected);
    return &ok;
}

def_visible_primitive(DoGamebryoView,
                     "DoGamebryoView");


What is causing these error messages to appear?

2 REPLIES 2
Message 2 of 3
Steve_Curley
in reply to: Anonymous

CODE tags corrected - use the "Insert Code" button on the toolbar as this is not a BBCode forum.

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

Message 3 of 3

macroScript FP_MS_SelectCustomObject
    ButtonText:"Select Forest Custom Object"
    category:"Forest Pack"
    (
    global FP_SelectorItems
    global FP_SelectorNames
    on IsVisible return (isForestPack $)
    on Execute do
        (
        FP_SelectorItems = #()
        FP_SelectorNames = #()
        for i = 1 to $.cobjlist.count do
            (
            if $.cobjlist[i] != undefined then
                (
                append FP_SelectorItems $.cobjlist[i]
                append FP_SelectorNames $.namelist[i]
                )
            )
        FP_ShowMenuSelector()
        )
    )

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report