Error Help
#1

Hello

i have problem when i compile this :

mysql R39-2


pawn Код:
CMD:cmembers(playerid, params[])
{
    if(playerVariables[playerid][pClan] >= 1 && playerVariables[playerid][pClanRank] >= 6)
    {
        new aim[1500];
        format(aim, 256,"{FFB300}%s members:{FFFFFF} \n",clanVariables[playerVariables[playerid][pClan]][cClanName]);
        new test[256];
        new query[256];
        new stringg[256];
        new memid;
        mysql_format(handle, stringg, sizeof(stringg), "SELECT playerName, playerClanRank FROM playeraccounts WHERE playerClan = %d ORDER BY playerClanRank DESC LIMIT 50",playerVariables[playerid][pClan]);
        mysql_query(handle, query);
        mysql_format(handle, stringg, sizeof(stringg), "SELECT playerClanRank FROM playeraccounts WHERE playerClan = %d",playerVariables[playerid][pClan]);
        new Cache: result12 = mysql_query (handle, stringg);
        for ( new i, j = cache_get_row_count ( ); i != j; ++i )
        {
            cache_get_field_content(query, "playerName");
            format(Selected[memid][snume],24, query);
           
            cache_get_field_content(test, "playerClanRank");
            Selected[memid][srank] = strval(test);
           
            format(aim, sizeof(aim), "%s %s - Rank: %s \n", aim, query, test);
        }
        cache_delete(result12);
        ShowPlayerDialog(playerid,DIALOG_CMEMBERS,DIALOG_STYLE_LIST,"Members in clan",aim,"Go","Cancel");
    }
}
Errors :
Код:
(27288) : error 035: argument type mismatch (argument 1)
(27291) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
(2728
pawn Код:
cache_get_field_content(query, "playerName");
(27291)
pawn Код:
cache_get_field_content(test, "playerClanRank");
Reply
#2

Try
pawn Код:
cache_get_field_content(0, query, "playerName");
cache_get_field_content(0, test, "playerClanRank");
Reply
#3

it should be like

pawn Код:
cache_get_field_content(0,"playerName",Name[playerid],cHandle,24);
cache_get_field_content(0, "playerClanRank",pInfo[playerid][playerClanRank],cHandle, 25);
Reply
#4

Quote:
Originally Posted by Magnuson
Посмотреть сообщение
Try
pawn Код:
cache_get_field_content(0, query, "playerName");
cache_get_field_content(0, test, "playerClanRank");
thx bro.
Quote:
Originally Posted by Namer
Посмотреть сообщение
it should be like

pawn Код:
cache_get_field_content(0,"playerName",Name[playerid],cHandle,24);
cache_get_field_content(0, "playerClanRank",pInfo[playerid][playerClanRank],cHandle, 25);
thx bro.
now i geted this error
Code:
pawn Код:
case DIALOG_CLAN:
        {
            if(!response)
            {
                hidePlayerDialog(playerid);
            }
            else
            {
                if(playerVariables[playerid][pClan] >= 1)
                {
                    switch(listitem)
                    {
                        case 0:
                        {
                            ShowPlayerDialog(playerid, DIALOG_CLAN_TAG, DIALOG_STYLE_LIST, "Server: Clan","Type 0: off\nType 1: Tag Name\nType 2: Name Tag", "Select", "Cancel");
                        }
                        case 1:
                        {
                            new memid,last[256];
                            new aim[1000];
                            format(aim, 256,"{FFB300}%s members:{FFFFFF} \n",clanVariables[playerVariables[playerid][pClan]][cClanName]);
                            new query[300],test[300];
                            format(query, sizeof(query), "SELECT playerName,playerClanRank, playerLastLogin FROM playeraccounts WHERE playerClan = %d ORDER BY playerClanRank DESC LIMIT 50",playerVariables[playerid][pClan]);
                            mysql_query(query);
                            format(test, sizeof(test), "SELECT playerClanRank FROM playeraccounts WHERE playerClan = %d",playerVariables[playerid][pClan]);
                            mysql_query(test);
                            format(last, sizeof(last), "SELECT playerLastLogin FROM playeraccounts WHERE playerClan = %d",playerVariables[playerid][pClan]);
                            mysql_query(last);
                            mysql_store_result();
                            while(mysql_retrieve_row())
                            {
                                mysql_fetch_field_row(query, "playerName");
                                format(Selected[memid][snume],24,"%s",query);
                                mysql_fetch_field_row(test, "playerClanRank");
                                Selected[memid][srank] = strval(test);
                                mysql_fetch_field_row(last, "playerLastLogin");
                                new id = GetPlayerID(Selected[memid][snume]);
                                if(id != INVALID_PLAYER_ID)
                                {
                                    format(aim, sizeof(aim), "%s %s - Rank: %s - online right now \n",aim,query, test);
                                }
                                else
                                {
                                    format(aim, sizeof(aim), "%s %s - Rank: %s - Last login: %s \n",aim,query, test,last);
                                }
                                memid ++;
                            }
                            mysql_free_result();
                            ShowPlayerDialog(playerid,DIALOG_CMEMBERS,DIALOG_STYLE_LIST,"Members in clan",aim,"Go","Cancel");
Код:
(15435) : error 035: argument type mismatch (argument 1)
(15437) : error 035: argument type mismatch (argument 1)
(15439) : error 035: argument type mismatch (argument 1)
(15440) : error 017: undefined symbol "mysql_store_result"
(15441) : error 017: undefined symbol "mysql_retrieve_row"
(15443) : error 017: undefined symbol "mysql_fetch_field_row"
(15445) : error 017: undefined symbol "mysql_fetch_field_row"
(15447) : error 017: undefined symbol "mysql_fetch_field_row"
(15459) : error 017: undefined symbol "mysql_free_result"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
(15437)
pawn Код:
mysql_query(test);
(15439)
pawn Код:
mysql_query(last);
(15440)
pawn Код:
mysql_store_result();
(15441)
pawn Код:
while(mysql_retrieve_row())
(15445)
pawn Код:
mysql_fetch_field_row(test, "playerClanRank");
(15447)
pawn Код:
mysql_fetch_field_row(last, "playerLastLogin");
(15459)
pawn Код:
mysql_free_result()
Reply
#5

you are using wrong plugin + include you need to change it

becoz mysql_fetch_field_row is not in R39-2
Reply
#6

Quote:
Originally Posted by Namer
Посмотреть сообщение
you are using wrong plugin + include you need to change it

becoz mysql_fetch_field_row is not in R39-2
Yes bro , R6 , can help me please , to change it in R39-2?
Reply
#7

Quote:
Originally Posted by KingPersona
Посмотреть сообщение
thx bro.


thx bro.
now i geted this error
Code:
pawn Код:
case DIALOG_CLAN:
        {
            if(!response)
            {
                hidePlayerDialog(playerid);
            }
            else
            {
                if(playerVariables[playerid][pClan] >= 1)
                {
                    switch(listitem)
                    {
                        case 0:
                        {
                            ShowPlayerDialog(playerid, DIALOG_CLAN_TAG, DIALOG_STYLE_LIST, "Server: Clan","Type 0: off\nType 1: Tag Name\nType 2: Name Tag", "Select", "Cancel");
                        }
                        case 1:
                        {
                            new memid,last[256];
                            new aim[1000];
                            format(aim, 256,"{FFB300}%s members:{FFFFFF} \n",clanVariables[playerVariables[playerid][pClan]][cClanName]);
                            new query[300],test[300];
                            format(query, sizeof(query), "SELECT playerName,playerClanRank, playerLastLogin FROM playeraccounts WHERE playerClan = %d ORDER BY playerClanRank DESC LIMIT 50",playerVariables[playerid][pClan]);
                            mysql_query(query);
                            format(test, sizeof(test), "SELECT playerClanRank FROM playeraccounts WHERE playerClan = %d",playerVariables[playerid][pClan]);
                            mysql_query(test);
                            format(last, sizeof(last), "SELECT playerLastLogin FROM playeraccounts WHERE playerClan = %d",playerVariables[playerid][pClan]);
                            mysql_query(last);
                            mysql_store_result();
                            while(mysql_retrieve_row())
                            {
                                mysql_fetch_field_row(query, "playerName");
                                format(Selected[memid][snume],24,"%s",query);
                                mysql_fetch_field_row(test, "playerClanRank");
                                Selected[memid][srank] = strval(test);
                                mysql_fetch_field_row(last, "playerLastLogin");
                                new id = GetPlayerID(Selected[memid][snume]);
                                if(id != INVALID_PLAYER_ID)
                                {
                                    format(aim, sizeof(aim), "%s %s - Rank: %s - online right now \n",aim,query, test);
                                }
                                else
                                {
                                    format(aim, sizeof(aim), "%s %s - Rank: %s - Last login: %s \n",aim,query, test,last);
                                }
                                memid ++;
                            }
                            mysql_free_result();
                            ShowPlayerDialog(playerid,DIALOG_CMEMBERS,DIALOG_STYLE_LIST,"Members in clan",aim,"Go","Cancel");
Код:
(15435) : error 035: argument type mismatch (argument 1)
(15437) : error 035: argument type mismatch (argument 1)
(15439) : error 035: argument type mismatch (argument 1)
(15440) : error 017: undefined symbol "mysql_store_result"
(15441) : error 017: undefined symbol "mysql_retrieve_row"
(15443) : error 017: undefined symbol "mysql_fetch_field_row"
(15445) : error 017: undefined symbol "mysql_fetch_field_row"
(15447) : error 017: undefined symbol "mysql_fetch_field_row"
(15459) : error 017: undefined symbol "mysql_free_result"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
(15437)
pawn Код:
mysql_query(test);
(15439)
pawn Код:
mysql_query(last);
(15440)
pawn Код:
mysql_store_result();
(15441)
pawn Код:
while(mysql_retrieve_row())
(15445)
pawn Код:
mysql_fetch_field_row(test, "playerClanRank");
(15447)
pawn Код:
mysql_fetch_field_row(last, "playerLastLogin");
(15459)
pawn Код:
mysql_free_result()
At least for the tag mismatches it's because you need to include the connection handle, whatever you set the variable as. As an example (the first one), it should look like:

pawn Код:
mysql_query(putconhandlehere, test);
So if you don't put that conhandle in, you'll get that warning/error.

https://sampwiki.blast.hk/wiki/MySQL/R33
Reply
#8

Quote:
Originally Posted by Magnuson
Посмотреть сообщение
At least for the tag mismatches it's because you need to include the connection handle, whatever you set the variable as. As an example (the first one), it should look like:

pawn Код:
mysql_query(putconhandlehere, test);
So if you don't put that conhandle in, you'll get that warning/error.

https://sampwiki.blast.hk/wiki/MySQL/R33
Thx for answer Bro ,and Help ,sorry I use R39-2 , not R33
Reply
#9

Quote:
Originally Posted by KingPersona
Посмотреть сообщение
Thx for answer Bro ,and Help ,sorry I use R39-2 , not R33
Shouldn't that be the same though? Did you try it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)