[SOS]argument type mismatch (argument 3) and error 017: undefined symbol "mysql_query"
#3

//old post............

PHP код:
CMD:bagitem(playeridparams[])
{
    new 
string[128];
    if(!
CheckAdmin(playeridHIGH_ADMIN_LEVEL)) return NotAuthMSG(playerid);
    if(
sscanf(params"dd"params[0], params[1]))
    {
         
SendClientMessage(playeridCOLOR_RED"/bagitem [itemID] [itemAmount]");
        return 
1;
    }
    if(
GetBagItemCount(playerid) >= MAX_ITEMS) return SCM(playeridCOLOR_RED"数量已经超出最大物品限制");
    
//format(string, sizeof(string), "%s", GetName(playerid));
    
_AddDatabaseItem(strval(params[0]), strval(params[1]), playerid);//
    
LoadPlayerBag(playerid);
    
SCM(playeridCOLOR_GREEN"成功添加 !");
    return 
1;

PHP код:
stock _AddDatabaseItem(itemamountowner)
{
        new 
query[200];
    
format(querysizeof(query), "INSERT INTO `bagitems`(`Owner`, `Item`, `ItemAmount`) VALUES (%s, %d, %d)"GetName(owner), itemamount);
    
mysql_query(query);
    return 
1;

PHP код:
stock _RemoveDatabaseItem(id)
{
        new 
query[100];
    
format(querysizeof(query), "DELETE FROM `bagitems` WHERE `ID` = %d"id);
    
mysql_query(query);
    return 
1;

Reply


Messages In This Thread
[SOS]argument type mismatch (argument 3) and error 017: undefined symbol "mysql_query" - by Mavis100 - 15.04.2014, 14:18
Re: [SOS]argument type mismatch (argument 3) and error 017: undefined symbol "mysql_query" - by OMonger - 25.01.2015, 19:22
Re: [SOS]argument type mismatch (argument 3) and error 017: undefined symbol "mysql_query" - by Matess - 25.01.2015, 20:14

Forum Jump:


Users browsing this thread: 4 Guest(s)