MySQL BlueG R 38 HELP
#1

Okay so I got this code>
pawn Код:
CMD:top(playerid, params[])
{
    new playerData[512], clanname[MAX_PLAYER_NAME], string[512], clankills;
    mysql_query(MysqlCon,"SELECT `user`, `Score` FROM `players` ORDER BY `Score`");
    mysql_store_result();
    while(mysql_retrieve_row())
    {
        mysql_fetch_row(playerData);
        sscanf(playerData, "p<|>s[512]d", clanname, clankills);

        format(string, sizeof(string), "%s\n"RED"Clan: %s"BLUE"Kills: %d", string, clanname, clankills);
        //SendClientMessage(playerid, ~1, string);
        ShowPlayerDialog( playerid, 1, DIALOG_STYLE_MSGBOX,"Location: Top Clans", string, "(Close)", "");
    }
    mysql_free_result();
    return 1;
}
I get some errors
Код:
C:\Users\Bradley\Desktop\SA-MP\gamemodes\cnr.pwn(3501) : error 017: undefined symbol "mysql_store_result"
C:\Users\Bradley\Desktop\SA-MP\gamemodes\cnr.pwn(3502) : error 017: undefined symbol "mysql_retrieve_row"
C:\Users\Bradley\Desktop\SA-MP\gamemodes\cnr.pwn(3504) : error 017: undefined symbol "mysql_fetch_row"
C:\Users\Bradley\Desktop\SA-MP\gamemodes\cnr.pwn(3511) : error 017: undefined symbol "mysql_free_result"
How do I fix?
Reply
#2

Beacuse you use wrong mysql plugin. R38 has not function mysql_store_result. You need mysql plugin R6 if I correct. I hope so that I help you.
Reply
#3

How would I be able to make the code into R38?
Reply
#4

you have tutorials on forums. I still learning new functions for r38. Use search.
Reply
#5

Anyone know how to do it?
Reply
#6

You need to use the R5 version or R6. I prefer R7
Reply
#7

i have no idea what are you doing with that command. do you want to retrieve the top clans or player's score?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)