mysql_query argument type mismatch
#3

Every tutorial on the internet , It is always like this; mysql_query(string); . But I can't get rid of this error.
Here's all my code;
Quote:

#include <a_samp>
#include <a_mysql>
#include <sscanf>
#include <zcmd>

#define HOST "localhost"
#define SUSER "root"
#define PASS "123"
#define DB "area51"

Quote:

public OnGameModeInit()
{
mysql_connect("HOST", "USER", "DB", "PASS");
return 1;
}

Quote:

CMD: setvip(playerid, params[])
{
new targetid, query[126], pName[MAX_PLAYER_NAME];
if(sscanf(params, "ud",targetid))
{
SendClientMessage(playerid, COLOR_ERROR, "{6EF83C}Kullanım:{FFFFFF} /setvip [playerid]");
return 1;
}
if(IsPlayerConnected(targetid))
{
GetPlayerName(targetid, pName, sizeof(pName));
format(query, sizeof(query), "UPDATE `uyeler` SET vip = '%d', WHERE k_adi = '%s'", 1, pName);
mysql_query(query); <-- error 35: argument type mismatch (argument 1)
}

return 1;
}

What should I change here ?
Reply


Messages In This Thread
mysql_query argument type mismatch - by Jackieboyhd - 03.08.2017, 02:32
Re: mysql_query argument type mismatch - by Dayrion - 03.08.2017, 02:52
Re: mysql_query argument type mismatch - by Jackieboyhd - 03.08.2017, 13:04
Re: mysql_query argument type mismatch - by ISmokezU - 03.08.2017, 13:37
Re: mysql_query argument type mismatch - by Dayrion - 03.08.2017, 15:06
Re: mysql_query argument type mismatch - by Jackieboyhd - 03.08.2017, 16:28
Re: mysql_query argument type mismatch - by grymtn - 03.08.2017, 17:36
Re: mysql_query argument type mismatch - by ISmokezU - 03.08.2017, 18:08
Re: mysql_query argument type mismatch - by Jackieboyhd - 03.08.2017, 19:28

Forum Jump:


Users browsing this thread: 2 Guest(s)