[HELP]mysql_retrieve_row
#1

Normal code is:

Код:
                    while (mysql_retrieve_row())
					{
                        mysql_fetch_field_row(string, "Money"); GivePlayerMoney(playerid, strval(string));
                        mysql_fetch_field_row(string, "Score"); SetPlayerScore(playerid, strval(string));
                    }
                    mysql_free_result();
i definied:

Код:
#define GET_INT(%1,%2) 					mysql_fetch_field_row(tmp, %2);%1 = strval(tmp)
and the code..

Код:
                    while (mysql_retrieve_row())
					{
                        GET_INT(/* THIS  */???, "Money");
                        GET_INT(/* THIS */???, "Score");
                    }
                    mysql_free_result();
help please ?
Reply
#2

That would work
pawn Код:
#define GET_INT(%0) (mysql_fetch_field_row(tmp, %0), strval(tmp))
pawn Код:
//
                    while (mysql_retrieve_row()) {
                        GivePlayerMoney(playerid, GET_INT("Money"));
                        SetPlayerScore(playerid, GET_INT("Score"));
                    }
                    mysql_free_result();
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)