Check Ban CMD - Not working
#8

Quote:
Originally Posted by itsCody
Посмотреть сообщение
PHP код:
CMD:baninfo(playeridparams[])
{
    new 
name[25];
    
    if(
sscanf params"s[25]"name ) )
         return 
SendUsageError(playerid"/baninfo [Name]");
         
    new 
query[128];
    
    
mysql_format(mysqlquerysizeof(query), "SELECT * FROM `BanTable` WHERE Name = '%e'"name);
    
mysql_tquery(mysqlquery"BanInfo""s"name);
    return 
1;

Could try that ^^
I've tried that, but now it just keeps showing me the usage message even when I typed something in, it's not even showing me the 'Ban not found' error or the 'Unknown command' error.

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
PHP код:
    new name;
    
    if( 
sscanfparams"s"name ) ) 
Do these lines even work ?! without array size ? Well if this is your actual code and the result, it seems to be working and I didn't know it.
Anyway as you can see in mysql log, everything works perfectly up until your format, so I guess maybe format fails cuz str is too small so try increasing it's size and trying again ? probably if you put a printf there you'll see that it fetches the result but fails to format and send the SCM.
I've tried that and still nothing changed.
Reply


Messages In This Thread
Check Ban CMD - Not working - by FunnyBear - 16.01.2016, 12:57
Re: Check Ban CMD - Not working - by Dejv - 16.01.2016, 13:04
Re: Check Ban CMD - Not working - by FunnyBear - 16.01.2016, 13:05
Re: Check Ban CMD - Not working - by FunnyBear - 16.01.2016, 15:57
Re: Check Ban CMD - Not working - by PrO.GameR - 16.01.2016, 16:44
Re: Check Ban CMD - Not working - by itsCody - 16.01.2016, 16:51
Re: Check Ban CMD - Not working - by iKarim - 16.01.2016, 17:01
Re: Check Ban CMD - Not working - by FunnyBear - 16.01.2016, 18:09
Re: Check Ban CMD - Not working - by itsCody - 16.01.2016, 18:14
Re: Check Ban CMD - Not working - by Eth - 16.01.2016, 18:15

Forum Jump:


Users browsing this thread: 1 Guest(s)