String returning a weird value
#1

Hey folks!

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(querysizeof(query), "SELECT * FROM 'BannedAccounts' WHERE 'UserName' = %s "usertounban);
    
mysql_tquery(mysqlquery,"CheckBan","d",playerid); 
    
printf("%s",query);
    
printf("%s",usertounban);
    print(
"CMD:unban -- properly executed");
    return 
1;

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
Reply


Messages In This Thread
String returning a weird value - by [CG]Milito - 09.10.2014, 03:07
Re: String returning a weird value - by The__ - 09.10.2014, 03:12
Re: String returning a weird value - by ThePhenix - 09.10.2014, 03:20
Re: String returning a weird value - by [CG]Milito - 09.10.2014, 03:26
Re: String returning a weird value - by [CG]Milito - 09.10.2014, 03:34
Re: String returning a weird value - by Emmet_ - 09.10.2014, 03:54
Re: String returning a weird value - by ThePhenix - 09.10.2014, 04:05

Forum Jump:


Users browsing this thread: 2 Guest(s)