09.10.2014, 03:07
Hey folks!
I have a problem with an unban command, the string keeps returning a weird value.
As you can see above, I'm telling the console to output the string value, and it returns this weird character: я
No matter what name I type in the command, it keeps returning the same value
I know this is a easy to solve problem but I can't figure it out!
Thanks for your help
-Milito
I have a problem with an unban command, the string keeps returning a weird value.
PHP код:
CMD:unban(playerid,params[])
{
new query[126];
new usertounban[24];
if(sscanf(params, "u[24]", usertounban)) return SendClientMessage(playerid,-1,"{FF0000}__**ERROR**__ {FFFFFF}Usage /Unban <Username>");
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, -1, "{FF0000}__**ERROR**__ {FFFFFF} You are not authorized to use that command!");
format(query, sizeof(query), "SELECT * FROM 'BannedAccounts' WHERE 'UserName' = %s ", usertounban);
mysql_tquery(mysql, query,"CheckBan","d",playerid);
printf("%s",query);
printf("%s",usertounban);
print("CMD:unban -- properly executed");
return 1;
}
No matter what name I type in the command, it keeps returning the same value
I know this is a easy to solve problem but I can't figure it out!
Thanks for your help
-Milito