C++ ScoreRecordSet::GetScoreValue()
From J2Play
Contents |
Description
Get the score value specified by the record index and the value index.
Syntax
long long ScoreRecordSet::GetScoreValue(unsigned int record_index, unsigned int score_index) const;
Parameters
* @param record_index, the index of record in record set * @param score_index, the index of score value in record
Return Value
@return the specified score value
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)
{
// handle score values
}
}
}
