Printf doesnt display the string? -
Dokins - 13.03.2012
pawn Код:
if(sscanf(params, "s[32]",usage))
{
printf("USAGE: %s", usage);
SendClientMessage(playerid, COLOUR_GREY, "Usage: /trunk [usage]");
SendClientMessage(playerid, COLOUR_GREY, "Usages: Store, Get, View");
return 1;
}
Any ideas why?
Re: Printf doesnt display the string? -
Mike_Peterson - 13.03.2012
You made another thread? I doubt that's allowed, double threads for same problem... this is part of ur /trunk command problem, don't use double threads. though, wheres that [32] for, remove it, and try again.. if it doesn't work, post in the other thread.
Re: Printf doesnt display the string? -
EvgeN 1137 - 13.03.2012
client messages display?
Re: Printf doesnt display the string? -
iPLEOMAX - 13.03.2012
The string is NULL when the user hasn't input any text/params.
How would it display that?
You'll only get: "USAGE: " in the console.
Re: Printf doesnt display the string? -
Dokins - 13.03.2012
Yes, but I've put in params.
Re: Printf doesnt display the string? -
iPLEOMAX - 13.03.2012
If you've put params, that "if" statement isn't true.
So, it wouldn't show you the printf message.
Use it outside the compound.
pawn Код:
if(sscanf(params, "s[32]",usage))
{
SendClientMessage(playerid, COLOUR_GREY, "Usage: /trunk [usage]");
SendClientMessage(playerid, COLOUR_GREY, "Usages: Store, Get, View");
return 1;
}
printf("USAGE: %s", usage);
Re: Printf doesnt display the string? -
Dokins - 13.03.2012
Well, the second sscanf will not display.
pawn Код:
if(sscanf(params, "s[32]",usage))
{
SendClientMessage(playerid, COLOUR_GREY, "Usage: /trunk [usage]");
SendClientMessage(playerid, COLOUR_GREY, "Usages: Store, Get, View");
}
printf("USAGE: %s", usage);
VehicleSQLID[vehicleid] = MySQL_GetValue(VehicleSQLID[vehicleid], "id", "vehicles");
if(vehicleid == TrunkOpened[playerid])
{
if(strcmp(usage, "store", true))
{
printf("USAGE: %s", usage);
if(sscanf(usage, "s[24]",item))
{
SendClientMessage(playerid, COLOUR_GREY, "Usage: /trunk store [item]");
SendClientMessage(playerid, COLOUR_GREY, "Available Items: Weapon, Weed, Cocaine, Money, Armour");
}
printf("USAGE: %s", usage);
printf("ITEM: %s", item);
Any idea why?