SA-MP Forums Archive
Mysql R38 + inline - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mysql R38 + inline (/showthread.php?tid=518311)



Mysql R38 + inline - KesaSport - 09.06.2014

pawn Код:
inline LoadPlayerStats(pid)
    {
        #pragma unused pid
        if(cache_get_row_count(sVar::[SQL_Connection]) > 0)
        {
            print("something");
            new Float:zPos[3];
            pVar::playerid[Pinigai] = cache_get_field_content_int(0, "Pinigai");
            SetScore::playerid(cache_get_field_content_int(0, "Patirtis"));
            pVar::playerid[Lytis] = cache_get_field_content_int(0, "Lytis");
            zPos[0] = cache_get_field_content_float(0, "xPos");
            zPos[1] = cache_get_field_content_float(0, "yPos");
            zPos[2] = cache_get_field_content_float(0, "zPos");
            SetPos::playerid(zPos[0], zPos[1], zPos[2]);
            pVar::playerid[Reputacija] = cache_get_field_content_int(0, "Reputacija");
            cache_get_field_content(0, "EPastas", pVar::playerid[EPastas], sVar::[SQL_Connection], 50);
        }
    }
    new query[72];
    mysql_format(sVar::[SQL_Connection], szf[query], "SELECT * FROM `vartotojai` WHERE `Vardas`='%s'", zVardas(playerid));
    mysql_pquery(sVar::[SQL_Connection], query, using inline "LoadPlayerStats", "d", playerid);
Something not printed. Any ideas?


Re: Mysql R38 + inline - Misiur - 09.06.2014

pawn Код:
mysql_pquery(sVar::[SQL_Connection], query, using inline "LoadPlayerStats", "d", playerid);
//changes into
mysql_pquery_inline(sVar::[SQL_Connection], query, using inline LoadPlayerStats, "d", playerid);
Cheers

@down: updated


Re: Mysql R38 + inline - KesaSport - 09.06.2014

Quote:
Originally Posted by Misiur
Посмотреть сообщение
pawn Код:
mysql_pquery(sVar::[SQL_Connection], query, using inline "LoadPlayerStats", "d", playerid);
//changes into
mysql_pquery(sVar::[SQL_Connection], query, using inline LoadPlayerStats, "d", playerid);
Cheers
error 035: argument type mismatch (argument 3)


Re: Mysql R38 + inline - Misiur - 09.06.2014

Sorry, forgot about important part. Updated the answer


Re: Mysql R38 + inline - KesaSport - 09.06.2014

thanks.