03.08.2017, 13:04
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;
What should I change here ?
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; } |