SA-MP Forums Archive
SSCANF error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SSCANF error (/showthread.php?tid=642905)



SSCANF error - n00blek - 09.10.2017

Im on phone rn i cant provide code but i dot need to because errors are on lines that doest exist.
So when i hit compile i got undefined symbol SSCANF_OnGameModeInit and undefined sybol _ALS
Now i havr my sscanf inclided
#include <sscanf2>
And those were 2 errors but i dont remember other 5
Should i try to update sscanf
Is there more options?


Re: SSCANF error - ItsRobinson - 09.10.2017

Go back to code you've recently changed or edited and make sure it's perfect. From my experience with this error, its never actually a SSCANF problem, you've just broke something


Re: SSCANF error - n00blek - 09.10.2017

ok i found where its located but i dont know what is problem here:
PHP код:
    switch(dialogid)
    {
        case 
DIALOG_SPOL:
        {
               if(!
responseSetTimerEx("kick",1000,false,"d",playerid);
             if(
response)
             {
                 switch(
listitem)
                {
                    case 
0:
                    {
                        new 
str[200],dtxt[24],stxt[24];
                        
PlayerInfo[pInfo][pSpol] = 1;
                        if(
PlayerInfo[playerid][pDrzava] == 0) { dtxt "Bosna i Hercegovina";
                        }else if(
PlayerInfo[playerid][pDrzava] == 1) { dtxt "Hrvatska";
                        }else if(
PlayerInfo[playerid][pDrzava] == 2) { dtxt "Srbija";
                        }else if(
PlayerInfo[playerid][pDrzava] == 3) { dtxt "Makedonija";
                        }else if(
PlayerInfo[playerid][pDrzava] == 4) { dtxt "Crna Gora";
                        }else if(
PlayerInfo[playerid][pDrzava] == 5) { dtxt "Kosovo";
                        }else if(
PlayerInfo[playerid][pDrzava] == 6) { dtxt "Ostala drzava"; }
                        if(
PlayerInfo[playerid][pSpol] == 1) { stxt "Musko";
                        }else if(
PlayerInfo[playerid][pSpol] == 2) { stxt "Zensko"; }
                        
format(str,sizeof(str),"Vasi podatci:\n\n\nVasi podatci:\nStarost: %d\nDrzava: %s\nSpol: %s\n\nAko ste pravilno upisali vase podatke pritisnite Registracija, a ako niste pritisnite Ponovi.",PlayerInfo[playerid][pGodine],dtxt,stxt);
                        
ShowPlayerDialog(playerid,DIALOG_PROVJERA,DIALOG_STYLE_MSGBOX,"Registracija: Provjera",str,"Registracija","Ponovi");
                        return 
1;
                    }
                    case 
1:
                    {
                        new 
str[200],dtxt[24],stxt[24];
                        
PlayerInfo[pInfo][pSpol] = 2;
                          if(
PlayerInfo[playerid][pDrzava] == 0) { dtxt "Bosna i Hercegovina";
                        }else if(
PlayerInfo[playerid][pDrzava] == 1) { dtxt "Hrvatska";
                        }else if(
PlayerInfo[playerid][pDrzava] == 2) { dtxt "Srbija";
                        }else if(
PlayerInfo[playerid][pDrzava] == 3) { dtxt "Makedonija";
                        }else if(
PlayerInfo[playerid][pDrzava] == 4) { dtxt "Crna Gora";
                        }else if(
PlayerInfo[playerid][pDrzava] == 5) { dtxt "Kosovo";
                        }else if(
PlayerInfo[playerid][pDrzava] == 6) { dtxt "Ostala drzava"; }
                        if(
PlayerInfo[playerid][pSpol] == 1) { stxt "Musko";
                        }else if(
PlayerInfo[playerid][pSpol] == 2) { stxt "Zensko"; }
                        
format(str,sizeof(str),"Vasi podatci:\n\n\nVasi podatci:\nStarost: %d\nDrzava: %s\nSpol: %s\n\nAko ste pravilno upisali vase podatke pritisnite Registracija, a ako niste pritisnite Ponovi.",PlayerInfo[playerid][pGodine],dtxt,stxt);
                        
ShowPlayerDialog(playerid,DIALOG_PROVJERA,DIALOG_STYLE_MSGBOX,"Registracija: Provjera",str,"Registracija","Ponovi");
                        return 
1;
                    }
                }
            }
            return 
1;
        } 



Re: SSCANF error - ItsRobinson - 09.10.2017

Nevermind Hold on


Re: SSCANF error - n00blek - 09.10.2017

kk fixed it now it says statement is not in switch for case 1 but case 1 is same as case 0


Re: SSCANF error - n00blek - 09.10.2017

bump


Re: SSCANF error - Sew_Sumi - 09.10.2017

Paste up the actual error, as chances are you're missing the keywords in that error, and you're relaying it terribly.