sscanf warning
#8

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
what if you don't specify the size of the string ?
see what it says then
It's by default 32.

---

I actually run an example of your code:
pawn Код:
public OnFilterScriptInit( )
{
    new
        tmp[ 10 ],
        auxParams[ 124 ]
    ;
   
    sscanf( "commands blablablabla....", "s[10]S[124]", tmp, auxParams );

    printf( "1: \"%s\" & 2: \"%s\"", tmp, auxParams );
    return 1;
}
and I got:
pawn Код:
[22:07:54] sscanf warning: No default value found.
[22:07:54] 1: "commands" & 2: "blablablabla...."
Not what you got (those warnings). And by adding a default value, it doesn't give any sscanf warning.

pawn Код:
public OnFilterScriptInit( )
{
    new
        tmp[ 10 ],
        auxParams[ 124 ]
    ;
   
    sscanf( "commands", "s[10]S(Optional string)[124]", tmp, auxParams );

    printf( "1: \"%s\" & 2: \"%s\"", tmp, auxParams );
    return 1;
}
---

So I suggest you to post your problem in the sscanf's thread (since it's related to that) and you may get your answer faster than from this section.
Reply


Messages In This Thread
sscanf warning - by Noliax8 - 24.11.2013, 21:37
Re: sscanf warning - by park4bmx - 25.11.2013, 09:54
Re: sscanf warning - by TomatoRage - 25.11.2013, 10:38
Re: sscanf warning - by erminpr0 - 25.11.2013, 10:46
Re : Re: sscanf warning - by Noliax8 - 25.11.2013, 18:12
Re: sscanf warning - by park4bmx - 25.11.2013, 18:54
Re: sscanf warning - by -Prodigy- - 25.11.2013, 18:58
Re: sscanf warning - by Konstantinos - 25.11.2013, 19:08
Re: sscanf warning - by park4bmx - 25.11.2013, 20:53
Re : sscanf warning - by Noliax8 - 26.12.2013, 17:16

Forum Jump:


Users browsing this thread: 1 Guest(s)