C++ ScoreRecordSet::GetRecordCount()
From J2Play
Contents |
Description
Get the record count in the score record set
Syntax
unsigned int ScoreRecordSet::GetRecordCount() const;
Parameters
N/A
Return Value
@return the count
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
}
}
}
