SA-MP Forums Archive
[Problem] sscanf help - 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: [Problem] sscanf help (/showthread.php?tid=465523)



FIXED. [Close.] - Kemula - 22.09.2013

Close it, thanks


Respuesta: [Problem] sscanf help - Kemula - 22.09.2013

Only when I have this CMD in mi GM, it give me this errors:
Quote:

C:\Users\Dani\Desktop\Zenon City Role Play\pawno\include\YSI\y_utils.inc(645) : warning 219: local variable "f" shadows a variable at a preceding level
C:\Users\Dani\Desktop\Zenon City Role Play\pawno\include\YSI\y_ini.inc(449) : warning 219: local variable "f" shadows a variable at a preceding level
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2585) : error 017: undefined symbol "severTimers_yT@"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2586) : error 017: undefined symbol "severTimers2_yT@"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(258 : error 017: undefined symbol "saveAccounts_yT@"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2589) : error 017: undefined symbol "VehicleUpdate_yT@"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2590) : error 017: undefined symbol "ServerMicrobeat_yT@"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2591) : error 017: undefined symbol "SyncUp_yT@"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2592) : error 017: undefined symbol "Mensajes_yT@"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2593) : error 017: undefined symbol "EMSUpdate_yT@"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2595) : error 017: undefined symbol "SpecUpdate_yT@"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2651) : error 017: undefined symbol "GetPlayerVehicle"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2653) : error 017: undefined symbol "GetPlayerVehicle"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2660) : error 017: undefined symbol "GetPlayerVehicle"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2662) : error 017: undefined symbol "GetPlayerVehicle"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2663) : error 017: undefined symbol "GetPlayerVehicle"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2670) : error 017: undefined symbol "GetPlayerVehicle"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2671) : error 017: undefined symbol "UpdatePlayerVehicleMods"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2713) : error 017: undefined symbol "NOPCheck"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2727) : error 017: undefined symbol "NOPCheck"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2741) : error 017: undefined symbol "NOPCheck"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2753) : error 017: undefined symbol "NOPCheck"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2766) : error 017: undefined symbol "NOPCheck"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2780) : error 017: undefined symbol "NOPCheck"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2794) : error 017: undefined symbol "NOPCheck"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(280 : error 017: undefined symbol "NOPCheck"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2823) : error 017: undefined symbol "NOPCheck"
C:\Users\Dani\Desktop\Zenon City Role Play\gamemodes\ZenonCity.net.pwn(2837) : error 017: undefined symbol "NOPCheck"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.



Re: [Problem] sscanf help - Bingo - 22.09.2013

Any #includes missing?


Respuesta: Re: [Problem] sscanf help - Kemula - 22.09.2013

Quote:
Originally Posted by [vTc]Patroool
Посмотреть сообщение
Any #includes missing?
No D:


Re: [Problem] sscanf help - Bingo - 22.09.2013

Yes, Something is wrong with yfiles > y_utlis


Respuesta: Re: [Problem] sscanf help - Kemula - 22.09.2013

No, if i don't put this CMD, don't show me any error.


Re: [Problem] sscanf help - Konstantinos - 22.09.2013

Because you're missing 2 closed brackets (}). I indented your code, take a look on how it looks like:
pawn Код:
CMD:c(playerid, params[])
{
    if(IsACop(playerid))
    {
        if(!sscanf(params, "ds[128]", params[0], params[1]))
        {
            new string[128];
            if(params[1] < 1 || params[1] > 6) return SendClientMessage(playerid, COLOR_WHITE, "Error, no puede ser menor de 1 o mayor a 6");
            if(params[1] == 1)
            {
                SetPlayerWantedLevel(params[0], 1);
                Info[params[0]][pWantedLevel] = 1;
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(Team_SAPD(i) && OnDuty[i] == 1){
                        SetPlayerMarkerForPlayer(i, params[0], 0xF0E7A6FF);
                        format(string, sizeof(string), "{0091FF}[Radio policial]{FFFFFF}%s : {0091FF}%s{FFFFFF} parece sospechoso, voy a interrogarlo.", GetPlayerNameEx(playerid), GetPlayerNameEx(params[0]));
                        SendRadioMessage(1, COLOR_WHITE, string);
                    }
                }
               
            }
            if(params[1] == 2)
            {
                SetPlayerWantedLevel(params[0], 2);
                Info[params[0]][pWantedLevel] = 2;
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(Team_SAPD(i) && OnDuty[i] == 1){
                        SetPlayerMarkerForPlayer(i, params[0], 0xD1C462FF);
                        format(string, sizeof(string), "{0091FF}[Radio policial]{FFFFFF}%s : {0091FF}%s{FFFFFF} se resistio al arresto, procedemos a su persecucion.", GetPlayerNameEx(playerid), GetPlayerNameEx(params[0]));
                        SendRadioMessage(1, COLOR_WHITE, string);
                    }
                }
            }
            if(params[1] == 3)
            {
                SetPlayerWantedLevel(params[0], 3);
                Info[params[0]][pWantedLevel] = 3;
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(Team_SAPD(i) && OnDuty[i] == 1){
                        SetPlayerMarkerForPlayer(i, params[0], 0xCF9024FF);
                        format(string, sizeof(string), "{0091FF}[Radio policial]{FFFFFF}%s : {0091FF}%s{FFFFFF} se encuentra armado, prosigan con precauciуn.", GetPlayerNameEx(playerid), GetPlayerNameEx(params[0]));
                        SendRadioMessage(1, COLOR_WHITE, string);
                    }
                }
            }
            if(params[1] == 4)
            {
                SetPlayerWantedLevel(params[0], 4);
                Info[params[0]][pWantedLevel] = 4;
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(Team_SAPD(i) && OnDuty[i] == 1){
                        SetPlayerMarkerForPlayer(i, params[0], 0xCD7024FF);
                        format(string, sizeof(string), "{0091FF}[Radio policial]{FFFFFF}%s : {0091FF}%s{FFFFFF} abriу fuego, necesito refuerzos.", GetPlayerNameEx(playerid), GetPlayerNameEx(params[0]));
                        SendRadioMessage(1, COLOR_WHITE, string);
                    }
                }
            }
            if(params[1] == 5)
            {
                SetPlayerWantedLevel(params[0], 5);
                Info[params[0]][pWantedLevel] = 5;
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(Team_SAPD(i) && OnDuty[i] == 1){
                        SetPlayerMarkerForPlayer(i, params[0], 0xB54F23FF);
                        format(string, sizeof(string), "{0091FF}[Radio policial]{FFFFFF}%s : {0091FF}%s{FFFFFF} asesinу a un oficial, lo queremos vivo o muerto.", GetPlayerNameEx(playerid), GetPlayerNameEx(params[0]));
                        SendRadioMessage(1, COLOR_WHITE, string);
                    }
                }
            }
            if(params[1] == 6)
            {
                SetPlayerWantedLevel(params[0], 6);
                Info[params[0]][pWantedLevel] = 6;
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(Team_SAPD(i) && OnDuty[i] == 1){
                        SetPlayerMarkerForPlayer(i, params[0], 0xF80909FF);
                        format(string, sizeof(string), "{0091FF}[Radio policial]{FFFFFF}%s : {0091FF}%s{FFFFFF} es extremadamente peligroso, disparen a matar.", GetPlayerNameEx(playerid), GetPlayerNameEx(params[0]));
                        SendRadioMessage(1, COLOR_WHITE, string);
                    }
                }
            }
        }
        else SendClientMessage(playerid, COLOR_WHITE, "Utiliza: /c <playerid> <cargos>");
    }
    return 1;
}



Respuesta: [Problem] sscanf help - Kemula - 22.09.2013

Neither let me, I get the same errors


Re: [Problem] sscanf help - Konstantinos - 22.09.2013

Oh, alright.. I added the 2 closed bracket because you seem not to read what I said.. about fixing it yourself when I explained the problem. Plus, sscanf has nothing to do with it.


Respuesta: [Problem] sscanf help - Kemula - 22.09.2013

I changed the title. I hope a reply D: