Help with sscanf
#1

I need to be able to edit the name ingame of some houses, and I have a command like "/edithouse" that allows multiples names, like /edithouse owner, /edithouse name, /edithouse price.

So the question is, how could I use /edithouse name with sscanf supposing that the name could contain white spaces?
I have tried with this, but doesn't work.

pawn Код:
if(sscanf(params, "s[16]S[32]DU", action, name, value, player))
{
    SendClientMessage(playerid, White, "USE: /edithouse [Field]");
        return 1;
}
if(strcmp(action, "Name", true) == 0)
{
        if(sscanf(params, "s[16]s[32]", action, name)) return SendClientMessage(playerid, White, "USE: /edithouse name [Name]");
}
And when I try to write /edithouse name My House it returns the firms message "USE: /edithouse [Field]".

Thanks in advance.
Reply


Messages In This Thread
Help with sscanf - by Xabi - 31.03.2013, 21:34
Re: Help with sscanf - by Vince - 31.03.2013, 21:55
Re: Help with sscanf - by MP2 - 31.03.2013, 22:02
Respuesta: Help with sscanf - by Xabi - 01.04.2013, 08:32

Forum Jump:


Users browsing this thread: 2 Guest(s)