Sscanf in Strcmp?
#7

Quote:
Originally Posted by airplanesimen
Посмотреть сообщение
No sorry. If you mean the default Command processor, that is not possible.
Well honestly, it's possible. You just have to use the index of the first param as string in sscanf, e.g.
pawn Код:
if( !strcmp( cmdtext, "/cake", true ))
{
    //    /cake is 5 characters long. this means that index 6 is the first letter of the first param
    if( sscanf( cmdtext[ 6 ], "s[4]", "hey" ))
Something like that should be fully possible, as sscanf just splits and extracts parameters into variables.

Still would be more efficient to just use ZCMD though
Reply


Messages In This Thread
Sscanf in Strcmp? - by seanny - 30.01.2013, 10:13
Re: Sscanf in Strcmp? - by denNorske - 30.01.2013, 10:14
Re: Sscanf in Strcmp? - by seanny - 30.01.2013, 10:19
Re: Sscanf in Strcmp? - by u3ber - 30.01.2013, 10:22
Re: Sscanf in Strcmp? - by LarzI - 30.01.2013, 10:22
Re: Sscanf in Strcmp? - by denNorske - 30.01.2013, 10:23
Re: Sscanf in Strcmp? - by LarzI - 30.01.2013, 10:26
Re: Sscanf in Strcmp? - by u3ber - 30.01.2013, 10:27

Forum Jump:


Users browsing this thread: 1 Guest(s)