Quantcast
Channel: Cocos中文社区 - 最新帖子
Viewing all articles
Browse latest Browse all 494966

ScriptingCore::getInstance()->evalString可以有返回值么

$
0
0

import "js_manual_conversions.h"

ScriptingCore* sc = ScriptingCore::getInstance();
JSContext* cx = sc->getGlobalContext();
jsval outVal;
sc->evalString("cc.find('Game').getComponent('Player').onBeforeWillEnterForeground();", &outVal);
int val;
jsval_to_int(cx,outVal,&val);//为什么提示错误:no matching function to call jsval_to_int呢?

@jare


Viewing all articles
Browse latest Browse all 494966

Trending Articles