Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17083

log() only works with string literals..

$
0
0

@digimikeh wrote:

Hello friends…
i would like to print a variable value into console, but it is not doing…

void init(){
     //... all default events and expressions...
     this->scheduleUpdate();
}

void update(float dt){
     log("A");       //this prints fine...
     log(myVar);  //this prints nothing
}

myVar is a float declared on header…

I have tried with std::cout too with no result… is there any other way to print variables?

Thanks!

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>