Hi, I’m having trouble of showing double value in my label. In the picture shown below, notice on the upper right corner "POINTS: " there should be a value, ex. “32” but it won’t show, worst it messes up all other labels like what is shown on “TOP #1: SO SO” which it should be “TOP #1: SOYSOY”. Also it causes some other sprites not to show, ex. the second picture, there should be eight (8) blank gray squares where the user will input. I can say that the double value or setString() is the main reason for all of these, because everytime I remove it, everything works fine.
std::string getname = it->getUserName(); topname.append(getname); top_player->setString(topname); String * topscore = String::createWithFormat("POINTS: %.2f", it->getScoreValue()); //std::string topscore = "POINTS: "; //I tried using std::string instead of String, but still it won't work //std::string getscore = std::to_string(it->getScoreValue()); //topscore.append(getscore); top_player_xp->setString(topscore->getCString());
it->getScoreValue is double and is coming from App42 backend server