本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}