private void ExpectType(LuaValueType type) { if (m_type != type) { throw GenerateTypeError(type.GetTypeName()); } }
private void ExpectType(LuaValueType type, int index) { var foundType = this[index].Type; if (foundType != type) { throw GenerateTypeError(type.GetTypeName(), index); } }
private void ExpectType(LuaValue key, LuaValueType type) { var value = this[key]; if (value.Type != type) { throw GenerateTypeError(type.GetTypeName(), key); } }
public string GetTypeName() { if (m_type == LuaValueType.Object) { return(m_value.Object.TypeName); } else { return(m_type.GetTypeName()); } }