首页 > 代码库 > format not a string literal and no format arguments

format not a string literal and no format arguments

今天cocos2d-x打包 android的时候报错:format not a string literal and no format arguments

报错点是:__String::createWithFormat(s_szFuWenEffect2[GetType()])->getCString()

代码vs2015编译是通过的,没任何问题。

修改方法:__String::createWithFormat("%s", s_szFuWenEffect2[GetType()])->getCString()

 

format not a string literal and no format arguments