Quote:
Originally Posted by itsCody
PHP код:
CMD:baninfo(playerid, params[])
{
new name[25];
if(sscanf params, "s[25]", name ) )
return SendUsageError(playerid, "/baninfo [Name]");
new query[128];
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `BanTable` WHERE Name = '%e'", name);
mysql_tquery(mysql, query, "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( sscanf( params, "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.