02.10.2012, 00:09
Hello, i've been messing around with MySQL, and i created a unban command, appearenly i get this error.
pawn Код:
YCMD:unban(playerid, params[], help) {
if(help) {
SendClientMessage(playerid, X11_WHITE, "Unbans a player");
return 1;
}
new name[(MAX_PLAYER_NAME*2)+1];
query[0] = 0;//[256];
if(!sscanf(params, "s[" #MAX_PLAYER_NAME "]", name)) { //631
mysql_real_escape_string(name, name);
format(query, sizeof(query), "DELETE FROM `bans` WHERE `accountid` = (SELECT `id` FROM `accounts` WHERE `username` = \"%s\")",name);
mysql_function_query(g_mysql_handle, query, true, "BanDeleteCallback", "dds",playerid, 0, name);
} else {
SendClientMessage(playerid, X11_WHITE, "USAGE: /unban [accountname]");
}
return 1;
}
Код:
(631) : warning 215: expression has no effect (631) : error 001: expected token: ";", but found ")" (631) : error 029: invalid expression, assumed zero (631) : fatal error 107: too many error messages on one line (631) : error 001: expected token: ")", but found "-string-"