Resources
arcalet introduction
Example
Download
API usage instruction › ArcaletScore › Method

Method

General players
public static void CommitLeaderBoard(ArcaletGame game, string lguid, int tag, string score, OnCallCompletion cb, object token)
game       Game Login
lguid         Score board type
tag             Needed when putting in each player's score
score        The score that is to be recorded

Please note, score parameter value will be ignored if the type of the scoreboard is "counter". The score parameter tag is used to record each player's score.

void cb(int code, object token)
code with a value of 0 means the setup succeeded. A code other than 0 means the setup failed.
public static void RecordPlayerScore(ArcaletGame game,int tag, string score,OnCallCompletion cb, object token)
game       Game Login
tag            Tracks records, can be used to distinguish different types of scores
score        The score to be recorded, recording player's personal score

void cb(int code, object token)
code with a value of 0 means the setup succeeded. A code other than 0 means the setup failed.
public static void GetPlayerScore(ArcaletGame game, int tag, int orderby, int order, string startDate,string endDate, OnCallCompletionWithData cb, object token)
game         Game Login
tag               Used to track records, can be used to distinguish different types of scores
orderby       0: order by date, 1: order by scores
order           0: ascending order, 1: descending order
startDate    The start date during the query, the format is yyyy/mm/dd hh:mm:ss. An empty 
                     string indicates no start date
endDate     The end date during the query, the format is yyyy/mm/dd hh:mm:ss. An empty 
                     string indicates no end date

This method will obtain the player's score. The type of obj of cb(code,obj,token) is Hashtable. Each element of List is a score record and is recorded by Hashtable. The keys are:

'tag'          The score tag, which has to be the same as the parameter tag
'score'      Score
'stamp'     The time when the score is recorded. The format is: yyyy/mm/dd hh:mm:ss

If the player's score is recored with CommitLeaderBoard() and the type of the scoreboard is
"counter", then the keys for a player's score in the Hashtable are:

'tag'            The score tag, which has to be the same as the parameter tag
'daily'         The current day count (It will only occur when the box 'to be recorded' is checked 
                    in the scoreboard.)
'weekly'      Thecurrent week count (It will only occur when the box 'to be recorded' is checked 
                    in the scoreboard.)
'monthly'    The current month count (It will only occur when the box 'to be recorded' is 
                    checked in the scoreboard.)
'all'              The current total count will only occur when the box 'to be recorded' is checked in 
                    the scoreboard.
'stamp'       The time when the score is recorded. The format is yyyy/mm/dd hh:mm:ss

void cb(int code, object obj, object token)
code with a value of 0 means the setup succeeded. A code other than 0 means the setup failed.
public static void GetPlayerScore(ArcaletGame game, int tag, int orderby, int order, string startDate,string endDate, OnCallCompletionWithData cb, object token, int Num)
GetPlayerScore() is overloaded with an additional parameter Num which means only Num will be read
public static void GetLeaderBoard(ArcaletGame game, string lguid, int type, int ex, OnCallCompletionWithData cb, object token)
game       Game Login
lguid         The score board identifier
type           0 means to rank all, 1 means to rank by day, 2 means by week, 3 means by 
                   month 
ex               0 means the current rank.
                   A value other than 0 means historical rank, which numbers indicate how long the 
                   rank has been.

For example:

ex = 2, type = 3      means the rank has to be done by month prior to three months.
ex = 1, type = 2      means the rank has to be done by week prior to two weeks.

There are two overloaded methods.

Use this method to obtain the player's score. The type of obj of cb(code,obj,token) is Hashtable. Each element of List is a score record and is recorded by Hashtable, using the following keys:

"userid"        The player who records the score
"score”         The score
"stamp”        The time when the score is recorded. The format is yyyy/mm/dd hh:mm:ss

void cb(int code, object obj, object token)
code with a value of 0 means the setup succeeded. A code other than 0 means the setup failed.
public static void GetLeaderBoard(ArcaletGame game, string lguid, int type, int ex, OnCallCompletionWithData cb, object token,int Num)
GetLeaderBoard() has an additional parameter Num only Num will be read.
public static void GetLeaderBoard(ArcaletGame game, string lguid, int type, int orderby, int ex, OnCallCompletionWithData cb, object token)
game         Game Login
lguid           The score board lguid
type             0 means to rank all, 1 means to rank by day, 2 means by week, 3 means by 
                     month.
ex                 0 means the current rank.
                     A value other than 0 means historical rank.
                     Numbers indicate how long a time period to use to compute the rank. 

For example:

ex=2, type=3       means the rank has to be done by month prior to three months.
ex=1, type=2       means the rank has to be done by week prior to two weeks.

orderby

0       means the rank is by the scores, set in the background
1       means the rank is based on the time recored ( descending rank, the most current one 
          is at the top of the list).
2        means the rank is based on the time recored ( ascending rank, the furthest away in 
          time will be at the top of the list).

(There are two overloaded methods)

Obtain the player's score. The type of obj of cb(code,obj,token) is Hashtable. Each element of List is a score record and is recorded by Hashtable. The keys are:

“userid”         The player who recorded the score
"score”          The score
“stamp”         The time when the score is recorded. The format is yyyy/mm/dd hh:mm:ss

void cb(int code, object obj, object token)
code with a value of 0 means the setup succeeded. A code other than 0 means the setup failed.

public static void GetLeaderBoard(ArcaletGame game, string lguid, int type, int
orderby, int ex, OnCallCompletionWithData cb, object token,int Num)

GetLeaderBoard() has an additional parameter Num, only Num will be read.
Super User
public static void CommitLeaderBoard(ArcaletGame game, int poid,string lguid, int tag, string score,OnCallCompletion cb, object token)

public static void RecordPlayerScore(ArcaletGame game,int poid, int tag,string score,OnCallCompletion cb, object token)

public static void GetPlayerScore(ArcaletGame game,int poid,int tag, int orderby, int order,string startDate,string endDate,OnCallCompletionWithData cb, object token)

public static void GetPlayerScore(ArcaletGame game,int poid,int tag, int orderby, int order,string startDate,string endDate,OnCallCompletionWithData cb, object token,int Num)

public static void GetLeaderBoard(ArcaletGame game, int poid, string lguid, int type,OnCallCompletionWithData cb, object token)

public static void GetLeaderBoard(ArcaletGame game, int poid, string lguid, int type,OnCallCompletionWithData cb, object token,int Num)

public static void GetLeaderBoard(ArcaletGame game, int poid, string lguid, int type,int orderby, OnCallCompletionWithData cb, object token)

public static void GetLeaderBoard(ArcaletGame game, int poid, string lguid, int type,int orderby, OnCallCompletionWithData cb, object token,int Num)
Was this page helpful?
Yes No