sscanf warning
#1

I have noticed the following warnings on the server log:


Код:
[17:27:36] Remon_Blom has changed Jasper_Corleone's warrant setting.
[17:27:39] Remon_Blom has changed Jasper_Corleone's FAD setting.
[17:27:56] sscanf warning: Format specifier does not match parameter count.
[17:31:55] [part] Remon_Blom has left the server (2:1)
[17:34:22] sscanf warning: Format specifier does not match parameter count.
[17:34:29] sscanf warning: Format specifier does not match parameter count.
[17:34:30] sscanf warning: Format specifier does not match parameter count.
What is causing this?
Reply
#2

This could be due to this:

PHP код:
sccanf(input"iii"var1var2); 
I specified 3 integers but I actually passed only 2 as arguments.
Reply
#3

Quote:
Originally Posted by iKarim
Посмотреть сообщение
This could be due to this:

PHP код:
sccanf(input"iii"var1var2); 
I specified 3 integers but I actually passed only 2 as arguments.
Thanks for your response. The thing is, i dont use sscanf like that at the part where the warning occured.
The warning only occurs when you change someones FAD setting(firearmdangerous).

code:
PHP код:
new file[64], SearchOnPlayerMDC[50];
        
format(SearchOnPlayerMDCsizeof(SearchOnPlayerMDC), "%s"MDC[playerid][MDCPlayerSelected]);
        
format(filesizeof(file), "Accounts/%s.ini"SearchOnPlayerMDC);
        
MDCfad[playerid] = INI_Int(file"FAD");
        if(
MDCfad[playerid]==1)
        {
            
TextDrawHideForPlayer(playerid,PoliceComputerSPTD23);
            
TextDrawHideForPlayer(playerid,PoliceComputerSPTD24);
            
TextDrawHideForPlayer(playerid,PoliceComputerSPTD25);
            
MDCad[playerid] = 0;
        }
        else if(
MDCfad[playerid]==0)
        {
             
TextDrawShowForPlayer(playerid,PoliceComputerSPTD23);
            
TextDrawShowForPlayer(playerid,PoliceComputerSPTD24);
            
TextDrawShowForPlayer(playerid,PoliceComputerSPTD25);
           
MDCfad[playerid] = 1;
        }
        
INI_IntSet(file,"FAD"MDCfad[playerid]);
        
PlayerPlaySound(playerid,6400,0.0,0.0,0.0);
        
printf("%s has changed %s's FAD setting."GetName(playerid), MDC[playerid][MDCPlayerSelected]);
        return 
1
Is it related to changing FAD or is it elsewhere?
Reply
#4

It is from somewhere else, there's no sscanf calls on this code at all.
Reply
#5

maybe it`s from the cmd that changes the warrant setting?
Reply
#6

figure out when and which case is this problem is happening and than trace the code.
Reply
#7

Quote:
Originally Posted by Mugala
Посмотреть сообщение
figure out when and which case is this problem is happening and than trace the code.
Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
The warning only occurs when you change someones FAD setting(firearmdangerous).
Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
maybe it`s from the cmd that changes the warrant setting?
The warrant setting is actually not a cmd but also a textdraw.

Really confused of this.
Reply
#8

Just because it's appearing there, doesn't necessarily mean it's actually that.

It is after 2 minutes of the person who changed the setting logging off... I'd say look at other things. Like, don't get tunnel vision, and add in more debug printfs and such.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)