Quick CCLuaStack::executeScriptFile 无法执行path中带.的文件夹名

yangtao19cs
Fri, 27 Jun 2014 02:53:00 +0000

int CCLuaStack::executeScriptFile(const char *filename)
{
CCAssert(filename, “CCLuaStack::executeScriptFile() - invalid filename”);
std::string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename(filename);
unsigned long chunkSize = 0;
unsigned char chunk = CCFileUtils::sharedFileUtils()->getFileData(fullPath.c_str(), “rb”, &chunkSize);
if (lua_loadbuffer(m_state, (const char)chunk, (int)chunkSize, fullPath.c_str()) == 0)
{
return executeFunction(0);
}
return 0;
} 不能按照这个来走吗？

阅读整个主题