command r39-3
#1

What's wrong?
Код:
//========================================[CMD:SHOWFACTIONACTIVITY]============================================
CMD:showfactionactivity(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new jucator,numejucator[32],query[128],datastring[256],str[128], string[256];
        if(sscanf(params, "u", jucator)) return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /showfactionactivity [PlayerID/PartOfName]");
        GetPlayerName(jucator, numejucator, sizeof(numejucator));


        format(query, sizeof(query), "SELECT * FROM `NewsReporterActivity` WHERE `Player` = '%s' AND `Command` = '/news' AND `ZI` = 'Monday'", numejucator);
        mysql_tquery(handle,string, "", "");
        mysql_store_result();
        new dataluni = mysql_count_rows();
        mysql_free_result();

        format(query, sizeof(query), "SELECT * FROM `NewsReporterActivity` WHERE `Player` = '%s' AND `Command` = '/news' AND `ZI` = 'Tuesday'", numejucator);
        mysql_tquery(handle,string, "", "");
        mysql_store_result();
        new datamarti = mysql_count_rows();
        mysql_free_result();

        format(query, sizeof(query), "SELECT * FROM `NewsReporterActivity` WHERE `Player` = '%s' AND `Command` = '/news' AND `ZI` = 'Wednesday'", numejucator);
        mysql_tquery(handle,string, "", "");
        mysql_store_result();
        new datamiercuri = mysql_count_rows();
        mysql_free_result();

        format(query, sizeof(query), "SELECT * FROM `NewsReporterActivity` WHERE `Player` = '%s' AND `Command` = '/news' AND `ZI` = 'Thursday'", numejucator);
        mysql_tquery(handle,string, "", "");
        mysql_store_result();
        new datajoi = mysql_count_rows();
        mysql_free_result();

        format(query, sizeof(query), "SELECT * FROM `NewsReporterActivity` WHERE `Player` = '%s' AND `Command` = '/news' AND `ZI` = 'Friday'", numejucator);
        mysql_tquery(handle,string, "", "");
        mysql_store_result();
        new datavineri = mysql_count_rows();
        mysql_free_result();

        format(query, sizeof(query), "SELECT * FROM `NewsReporterActivity` WHERE `Player` = '%s' AND `Command` = '/news' AND `ZI` = 'Saturday'", numejucator);
        mysql_tquery(handle,string, "", "");
        mysql_store_result();
        new datasambata = mysql_count_rows();
        mysql_free_result();

        format(query, sizeof(query), "SELECT * FROM `NewsReporterActivity` WHERE `Player` = '%s' AND `Command` = '/news' AND `ZI` = 'Sunday'", numejucator);
        mysql_tquery(handle,string, "", "");
        mysql_store_result();
        new dataduminica = mysql_count_rows();
        mysql_free_result();

        new total = dataluni + datamarti + datamiercuri + datajoi + datavineri + datasambata + dataduminica;

        format(str, sizeof(str), "{FFFFFF}Activitatea lui %s", numejucator);
        format(datastring,sizeof(datastring)," Luni\t\t%d puncte\n Marti\t\t%d puncte\n Miercuri\t%d puncte\n Joi\t\t%d puncte\n Vineri\t\t%d puncte\n Sambata\t%d puncte\n Duminica\t%d puncte\n\n Total\t\t%d puncte\n ",dataluni, datamarti, datamiercuri, datajoi, datavineri, datasambata, dataduminica, total);

        ShowPlayerDialog(playerid, 991, DIALOG_STYLE_MSGBOX, str, datastring,"Close","");
    }
    return 1;
}
//return /showfactionactivity
CMD:sfa(playerid, params[])
{
return cmd_showfactionactivity(playerid, params);
}
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(25936) : error 017: undefined symbol "mysql_store_result"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(25937) : error 017: undefined symbol "mysql_count_rows"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(2593 : error 017: undefined symbol "mysql_free_result"
Reply
#2

upp
Reply
#3

?
Reply
#4

You are using functions that don't exist. Store result was used prior to threaded queries in R5. You need to update your code to support threaded queries as you can read in many tutorials.
Reply
#5

uppp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)