Printf doesnt display the string?
#1

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?
Reply
#2

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.
Reply
#3

client messages display?
Reply
#4

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.
Reply
#5

Yes, but I've put in params.
Reply
#6

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);
Reply
#7

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)