当前位置: 首页>>代码示例>>C++>>正文


C++ CScriptArgReader::GetFullErrorMessage方法代码示例

本文整理汇总了C++中CScriptArgReader::GetFullErrorMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ CScriptArgReader::GetFullErrorMessage方法的具体用法?C++ CScriptArgReader::GetFullErrorMessage怎么用?C++ CScriptArgReader::GetFullErrorMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CScriptArgReader的用法示例。


在下文中一共展示了CScriptArgReader::GetFullErrorMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetTeamColor

int CLuaTeamDefs::GetTeamColor ( lua_State* luaVM )
{
    CClientTeam* pTeam = NULL;
    CScriptArgReader argStream ( luaVM );
    argStream.ReadUserData ( pTeam );

    if ( !argStream.HasErrors () )
    {
        unsigned char ucRed, ucGreen, ucBlue;
        pTeam->GetColor ( ucRed, ucGreen, ucBlue );

        lua_pushnumber ( luaVM, ucRed );
        lua_pushnumber ( luaVM, ucGreen );
        lua_pushnumber ( luaVM, ucBlue );
        return 3;
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:Jusonex,项目名称:mtasa-blue,代码行数:22,代码来源:CLuaTeamDefs.cpp

示例2: GetKeyBoundToCommand

int CLuaFunctionDefs::GetKeyBoundToCommand ( lua_State* luaVM )
{
    SString strCommand = "";
    CScriptArgReader argStream ( luaVM );
    argStream.ReadString ( strCommand );

    if ( !argStream.HasErrors ( ) )
    {
        CLuaMain* pLuaMain = m_pLuaManager->GetVirtualMachine ( luaVM );
        if ( pLuaMain )
        {
            // get the key
            list < CKeyBind* > ::const_iterator iter = g_pCore->GetKeyBinds ()->IterBegin ();
            for ( ; iter != g_pCore->GetKeyBinds ()->IterEnd (); iter++ )
            {
                CKeyBind* pKeyBind = *iter;
                if ( !pKeyBind->IsBeingDeleted () && pKeyBind->bActive )
                {
                    if ( pKeyBind->GetType () == KEY_BIND_COMMAND )
                    {
                        CCommandBind* pBind = static_cast < CCommandBind* > ( pKeyBind );
                        if ( strcmp ( strCommand, pBind->szCommand ) == 0 )
                        {
                            lua_pushstring ( luaVM, pBind->boundKey->szKey );
                            return 1;
                        }
                    }
                }
            }
            lua_pushboolean ( luaVM, false );
            return 1;
        }
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage() );

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:AdiBoy,项目名称:mtasa-blue,代码行数:39,代码来源:CLuaFunctionDefs.Input.cpp

示例3: TransformPosition

int CLuaMatrixDefs::TransformPosition ( lua_State* luaVM )
{
    CLuaMatrix* pMatrix1 = NULL;
    CVector vector;

    CScriptArgReader argStream ( luaVM );
    argStream.ReadUserData ( pMatrix1 );
    argStream.ReadVector3D ( vector );

    if ( !argStream.HasErrors () )
    {
        lua_pushvector( luaVM, pMatrix1->TransformVector ( vector ) );
        return 1;
    }
    else
    {
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage() );
    }

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:StarSoftwareBuilder,项目名称:mtasa-blue,代码行数:22,代码来源:CLuaMatrixDefs.cpp

示例4: fileGetPath

int CLuaFileDefs::fileGetPath ( lua_State* luaVM )
{
    //  string fileGetPath ( file theFile )
    CScriptFile* pFile;

    CScriptArgReader argStream ( luaVM );
    argStream.ReadUserData ( pFile );

    if ( !argStream.HasErrors () )
    {
        // Grab our lua VM
        CLuaMain* pLuaMain = m_pLuaManager->GetVirtualMachine ( luaVM );
        if ( pLuaMain )
        {
            // We have a resource argument?
            CResource* pThisResource = pLuaMain->GetResource ();
            CResource* pFileResource = pFile->GetResource ();

            SString strFilePath = pFile->GetFilePath ();

            // If the calling resource is not the resource the file resides in 
            // we need to prepend :resourceName to the path
            if ( pThisResource != pFileResource )
            {
                SString strResourceName = pFileResource->GetName ();
                strFilePath = ":" + strResourceName + "/" + strFilePath;
            }

            lua_pushlstring ( luaVM, strFilePath.c_str (), strFilePath.length () );
            return 1;
        }
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );

    // Failed
    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:F420,项目名称:mtasa-blue,代码行数:39,代码来源:CLuaFileDefs.cpp

示例5: SetCursorAlpha

int CLuaFunctionDefs::SetCursorAlpha ( lua_State* luaVM )
{
//  bool setCursorAlpha ( float alpha )
    float fAlpha;

    CScriptArgReader argStream ( luaVM );
    argStream.ReadNumber ( fAlpha );

    if ( !argStream.HasErrors () )
    {
        if ( CStaticFunctionDefinitions::SetCursorAlpha ( fAlpha / 255.f ) )
        {
            lua_pushboolean ( luaVM, true );
            return 1;
        }
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:AdiBoy,项目名称:mtasa-blue,代码行数:22,代码来源:CLuaFunctionDefs.Input.cpp

示例6: GetBanAdmin

int CLuaBanDefs::GetBanAdmin ( lua_State* luaVM )
{
    CBan* pBan;

    CScriptArgReader argStream ( luaVM );
    argStream.ReadUserData ( pBan );

    if ( !argStream.HasErrors () )
    {
        SString strAdmin;
        if ( CStaticFunctionDefinitions::GetBanAdmin ( pBan, strAdmin ) )
        {
            lua_pushstring ( luaVM, strAdmin );
            return 1;
        }
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:Jusonex,项目名称:mtasa-blue,代码行数:22,代码来源:CLuaBanDefs.cpp

示例7: argStream

int CLuaVector3Defs::Destroy ( lua_State* luaVM )
{
    CLuaVector3D* pVector = NULL;

    CScriptArgReader argStream ( luaVM );
    argStream.ReadUserData ( pVector );

    if ( !argStream.HasErrors () )
    {
        delete pVector;

        lua_pushboolean ( luaVM, true );
        return 1;
    }
    else
    {
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage() );
    }

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:AdiBoy,项目名称:mtasa-blue,代码行数:22,代码来源:CLuaVector3Defs.cpp

示例8: textItemSetScale

int CLuaTextDefs::textItemSetScale ( lua_State* luaVM )
{
    CTextItem * pTextItem;
    float fScale;

    CScriptArgReader argStream ( luaVM );
    argStream.ReadUserData ( pTextItem );
    argStream.ReadNumber ( fScale );

    if ( !argStream.HasErrors ( ) )
    {
        pTextItem->SetScale ( fScale ); 

        lua_pushboolean ( luaVM, true);
        return 1;
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage() );

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:superherohay4,项目名称:mtasa-blue,代码行数:22,代码来源:CLuaTextDefs.cpp

示例9: SetWeaponState

int CLuaFunctionDefs::SetWeaponState ( lua_State* luaVM )
{
    CClientWeapon * pWeapon;
    eWeaponState weaponState;
    CScriptArgReader argStream ( luaVM );
    argStream.ReadUserData ( pWeapon );
    argStream.ReadEnumString ( weaponState );

    if ( !argStream.HasErrors () )
    {
        if ( CStaticFunctionDefinitions::SetWeaponState ( pWeapon, weaponState ) )
        {
            lua_pushboolean ( luaVM, true );
            return 1;
        }
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage() );

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:ntauthority,项目名称:openvice,代码行数:22,代码来源:CLuaFunctionDefs.Weapon.cpp

示例10: textDisplayRemoveObserver

int CLuaTextDefs::textDisplayRemoveObserver ( lua_State* luaVM )
{
    CTextDisplay * pTextDisplay;
    CPlayer * pPlayer;  

    CScriptArgReader argStream ( luaVM );
    argStream.ReadUserData ( pTextDisplay );
    argStream.ReadUserData ( pPlayer );

    if ( !argStream.HasErrors ( ) )
    {
        pTextDisplay->RemoveObserver ( pPlayer );

        lua_pushboolean ( luaVM, true );
        return 1;
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage() );

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:superherohay4,项目名称:mtasa-blue,代码行数:22,代码来源:CLuaTextDefs.cpp

示例11: textItemSetText

int CLuaTextDefs::textItemSetText ( lua_State* luaVM )
{
    CTextItem * pTextItem;
    SString strText;  

    CScriptArgReader argStream ( luaVM );
    argStream.ReadUserData ( pTextItem );
    argStream.ReadString ( strText );

    if ( !argStream.HasErrors ( ) )
    {
        pTextItem->SetText( strText );

        lua_pushboolean ( luaVM, true );
        return 1;
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage() );

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:superherohay4,项目名称:mtasa-blue,代码行数:22,代码来源:CLuaTextDefs.cpp

示例12: textDisplayAddText

int CLuaTextDefs::textDisplayAddText ( lua_State* luaVM )
{
    CTextDisplay * pTextDisplay;
    CTextItem * pTextItem;  

    CScriptArgReader argStream ( luaVM );
    argStream.ReadUserData ( pTextDisplay );
    argStream.ReadUserData ( pTextItem );

    if ( !argStream.HasErrors ( ) )
    {
        pTextDisplay->Add ( pTextItem );

        lua_pushboolean ( luaVM, true );
        return 1;
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage() );

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:superherohay4,项目名称:mtasa-blue,代码行数:22,代码来源:CLuaTextDefs.cpp

示例13: IsAmbientSoundEnabled

int CLuaFunctionDefs::IsAmbientSoundEnabled ( lua_State* luaVM )
{
    eAmbientSoundType eType;

    CScriptArgReader argStream ( luaVM );
    argStream.ReadEnumString ( eType );

    if ( !argStream.HasErrors () )
    {
        bool bResultEnabled;
        if ( CStaticFunctionDefinitions::IsAmbientSoundEnabled ( eType, bResultEnabled ) )
        {
            lua_pushboolean ( luaVM, bResultEnabled );
            return 1;
        }
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage() );

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:ntauthority,项目名称:openvice,代码行数:22,代码来源:CLuaFunctionDefs.Audio.cpp

示例14: SetAmbientSoundEnabled

int CLuaFunctionDefs::SetAmbientSoundEnabled ( lua_State* luaVM )
{
    eAmbientSoundType eType; bool bEnabled;

    CScriptArgReader argStream ( luaVM );
    argStream.ReadEnumString ( eType, AMBIENT_SOUND_GENERAL );
    argStream.ReadBool ( bEnabled );

    if ( !argStream.HasErrors () )
    {
        if ( CStaticFunctionDefinitions::SetAmbientSoundEnabled ( eType, bEnabled ) )
        {
            lua_pushboolean ( luaVM, true );
            return 1;
        }
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage() );

    lua_pushboolean ( luaVM, false );
    return 1;
}
开发者ID:ntauthority,项目名称:openvice,代码行数:22,代码来源:CLuaFunctionDefs.Audio.cpp

示例15: fileClose

int CLuaFileDefs::fileClose ( lua_State* luaVM )
{
    // string fileClose ( file )
    CScriptFile* pFile;
    CScriptArgReader argStream ( luaVM );
    argStream.ReadUserData ( pFile );

    if ( !argStream.HasErrors ( ) )
    {
        // Close the file and delete it
        pFile->Unload ();
        m_pElementDeleter->Delete ( pFile );

        lua_pushboolean ( luaVM, true );
        return 1;
    }
    else
        m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );

    lua_pushnil ( luaVM );
    return 1;
}
开发者ID:Citizen01,项目名称:mtasa-blue,代码行数:22,代码来源:CLuaFileDefs.cpp


注:本文中的CScriptArgReader::GetFullErrorMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。