C++ ScoreRecordSet::GetMessage()

From J2Play

Jump to: navigation, search

Contents

Description

Get the user defined message of score record

Syntax

const char* ScoreRecordSet::GetRecordMessage(unsigned int record_index) const;

Parameters

* @param record_index, the index of record in record set

Return Value

@return the message

Examples

Here is an usage example of the ScoreRecordSet class

 const ScoreRecordSet* records;
 ScoreController* score = CGDKInstnace::GetInstance()->GetScoreController();
 if (score)
 {
   records = score->EasyGetScore();
   unsigned int count = records->GetRecordCount();
   for (unsigned int i=0; i<count; ++i)
   {
     std::string username = records->GetUsername(i);
     std::string nickname = records->GetNickname(i);
     std::string message = records->GetMessage(i);
     unsigned int scorecount = records->GetScoresCount(i);
     for (unsigned int j=0; j<scorecount; ++j)
     {
       long long value = records->GetScoreValue(i,j);
       // handle score values
     }
   }
 }
Personal tools