SA-MP Forums Archive
Scripting Help: I get 12 warnings - 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: Scripting Help: I get 12 warnings (/showthread.php?tid=547441)



Scripting Help: I get 12 warnings - Samieastwood - 22.11.2014

C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(13353) : warning 202: number of arguments does not match definition
C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(13362) : warning 202: number of arguments does not match definition
C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(13371) : warning 202: number of arguments does not match definition
C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(31729) : warning 213: tag mismatch
C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(31730) : warning 213: tag mismatch
C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(31730) : warning 202: number of arguments does not match definition
C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(31731) : warning 213: tag mismatch
C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(31732) : warning 213: tag mismatch
C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(31732) : warning 202: number of arguments does not match definition
C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(31733) : warning 213: tag mismatch
C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(31734) : warning 213: tag mismatch
C:\Users\MdotC\Desktop\New folder (13)\gamemodes\J.pwn(31734) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


12 Warnings.


Re: Scripting Help: I get 12 warnings - Indom - 22.11.2014

Can you post the lines?


Re: Scripting Help: I get 12 warnings - Samieastwood - 22.11.2014

13353
PHP код:
    if(IsPlayerInRangeOfPoint(playerid3.0,240.8950,112.7382,1003.2188,270.1587))
        {
//LAPD
             
if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                
format(stringsizeof(string), "%s is a wanted individual, and is surrendering at your station!(LAPD)"GetPlayerNameEx(playerid));
                
SendRadioMessage(1DEPTRADIOstring);
             }
            return 
1;
        }
        else if(
IsPlayerInRangeOfPoint(playerid4.02531.3040,-1659.8525,562.8000,104.7559))
        {
//LASD
            
if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                
format(stringsizeof(string), "%s is a wanted individual, and is surrendering at your station(LASD)!"GetPlayerNameEx(playerid));
                
SendRadioMessage(7DEPTRADIOstring);
             }
            return 
1;
        }
        else if(
IsPlayerInRangeOfPoint(playerid3.0,234.9487,165.0764,1003.0300,80.0004))
        {
//LVMPD
            
if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                
format(stringsizeof(string), "%s is a wanted individual, and is surrendering at your station(LVMPD)!"GetPlayerNameEx(playerid));
                
SendRadioMessage(19DEPTRADIOstring);
             }
            return 
1;
        }
     }
    return 
0;

13362
PHP код:
else if(IsPlayerInRangeOfPoint(playerid4.02531.3040,-1659.8525,562.8000,104.7559))
        {
//LASD
            
if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                
format(stringsizeof(string), "%s is a wanted individual, and is surrendering at your station(LASD)!"GetPlayerNameEx(playerid));
                
SendRadioMessage(7DEPTRADIOstring);
             }
            return 
1;
        }
        else if(
IsPlayerInRangeOfPoint(playerid3.0,234.9487,165.0764,1003.0300,80.0004))
        {
//LVMPD
            
if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                
format(stringsizeof(string), "%s is a wanted individual, and is surrendering at your station(LVMPD)!"GetPlayerNameEx(playerid));
                
SendRadioMessage(19DEPTRADIOstring);
             }
            return 
1;
        }
     }
    return 
0;

13371
PHP код:
    else if(IsPlayerInRangeOfPoint(playerid3.0,234.9487,165.0764,1003.0300,80.0004))
        {
//LVMPD
            
if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                
format(stringsizeof(string), "%s is a wanted individual, and is surrendering at your station(LVMPD)!"GetPlayerNameEx(playerid));
                
SendRadioMessage(19DEPTRADIOstring);
             }
            return 
1;
        }
     }
    return 
0;

31729 to 31734
PHP код:
///////////////////// TURN IN POINTS /////////////////////
    
CreateDynamic3DTextLabel("/turnin",COLOR_DBLUE240.8950112.73821003.2188270.1587,4.0);///turnin(LAPD)
    
CreatePickup(124723240.8950112.73821003.2188270.1587, -1); // LAPD Turnin
    
CreateDynamic3DTextLabel("/turnin",COLOR_DBLUE2531.3040, -1659.8525,562.8000104.7559,4.0);///turnin(LASD)
    
CreatePickup(1247232531.3040, -1659.8525562.8000104.7559, -1); // LASD Turnin
    
CreateDynamic3DTextLabel("/turnin",COLOR_DBLUE234.9487165.07641003.030080.0004,4.0);///turnin(LVMPD)
    
CreatePickup(124723234.9487165.07641003.030080.0004, -1); // LVMPD Turnin 



Re: Scripting Help: I get 12 warnings - JaysonJee - 22.11.2014

try update your plugins maybe , not sure?


Re: Scripting Help: I get 12 warnings - sammp - 22.11.2014

Take the last co-ordinate out of your IsPlayerInRangeOfPoint..

It's just X, Y and Z. No angle


Re: Scripting Help: I get 12 warnings - Samieastwood - 22.11.2014

what should i do please? can you tell me , im not really that good at pawn


Re: Scripting Help: I get 12 warnings - Mic_H - 22.11.2014

Quote:
Originally Posted by Samieastwood
Посмотреть сообщение
13353
PHP код:
    if(IsPlayerInRangeOfPoint(playerid3.0,240.8950,112.7382,1003.2188,270.1587))//Mistake #1
        
{//LAPD
             
if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                
format(stringsizeof(string), "%s is a wanted individual, and is surrendering at your station!(LAPD)"GetPlayerNameEx(playerid));
                
SendRadioMessage(1DEPTRADIOstring);
             }
            return 
1;
        }
        else if(
IsPlayerInRangeOfPoint(playerid4.02531.3040,-1659.8525,562.8000,104.7559))//#2
        
{//LASD
            
if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                
format(stringsizeof(string), "%s is a wanted individual, and is surrendering at your station(LASD)!"GetPlayerNameEx(playerid));
                
SendRadioMessage(7DEPTRADIOstring);
             }
            return 
1;
        }
        else if(
IsPlayerInRangeOfPoint(playerid3.0,234.9487,165.0764,1003.0300,80.0004))//#3
        
{//LVMPD
            
if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                
format(stringsizeof(string), "%s is a wanted individual, and is surrendering at your station(LVMPD)!"GetPlayerNameEx(playerid));
                
SendRadioMessage(19DEPTRADIOstring);
             }
            return 
1;
        }
     }
    return 
0;

31729 to 31734
PHP код:
///////////////////// TURN IN POINTS /////////////////////
    
CreateDynamic3DTextLabel("/turnin",COLOR_DBLUE240.8950112.73821003.2188270.1587,4.0);///turnin(LAPD)//#4
    
CreatePickup(124723240.8950112.73821003.2188270.1587, -1); // LAPD Turnin#5
    
CreateDynamic3DTextLabel("/turnin",COLOR_DBLUE2531.3040, -1659.8525,562.8000104.7559,4.0);///turnin(LASD)#6
    
CreatePickup(1247232531.3040, -1659.8525562.8000104.7559, -1); // LASD Turnin#7
    
CreateDynamic3DTextLabel("/turnin",COLOR_DBLUE234.9487165.07641003.030080.0004,4.0);///turnin(LVMPD)#8
    
CreatePickup(124723234.9487165.07641003.030080.0004, -1); // LVMPD Turnin#9 
Mistakes
Mistakes #1-3
-Refer https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Mistake #4 and #6 and #8
-
Код:
CreateDynamic3DTextLabel ( text [],  color ,  Float : X ,  Float : Y ,  Float : Z ,  Float : DrawDistance )
Mistake #5,7,9
-Refer https://sampwiki.blast.hk/wiki/CreatePickup

From what I see, you added Angle for all the Functions..
To check range, we dont need angle..
3D texts are visible same way from all angle, so they dont need an angle to look to either..
Pickups are also 3D objects, they dont need angle.

Edit: Refer my post, and credits goes to the guy who posted first.. He already made the point clear.. Was typing when he posted it :P


Re: Scripting Help: I get 12 warnings - Write - 22.11.2014

There you go! just replace this with all of yours.
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 3.0,240.8950,112.7382,1003.2188))
        {//LAPD
             if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                format(string, sizeof(string), "%s is a wanted individual, and is surrendering at your station!(LAPD)", GetPlayerNameEx(playerid));
                SendRadioMessage(1, DEPTRADIO, string);
             }
            return 1;
        }
        else if(IsPlayerInRangeOfPoint(playerid, 4.0, 2531.3040,-1659.8525,562.8000))
        {//LASD
            if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                format(string, sizeof(string), "%s is a wanted individual, and is surrendering at your station(LASD)!", GetPlayerNameEx(playerid));
                SendRadioMessage(7, DEPTRADIO, string);
             }
            return 1;
        }
        else if(IsPlayerInRangeOfPoint(playerid, 3.0,234.9487,165.0764,1003.0300))
        {//LVMPD
            if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                format(string, sizeof(string), "%s is a wanted individual, and is surrendering at your station(LVMPD)!", GetPlayerNameEx(playerid));
                SendRadioMessage(19, DEPTRADIO, string);
             }
            return 1;
        }
     }
    return 0;
}
pawn Код:
else if(IsPlayerInRangeOfPoint(playerid, 4.0, 2531.3040,-1659.8525,562.8000))
        {//LASD
            if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                format(string, sizeof(string), "%s is a wanted individual, and is surrendering at your station(LASD)!", GetPlayerNameEx(playerid));
                SendRadioMessage(7, DEPTRADIO, string);
             }
            return 1;
        }
        else if(IsPlayerInRangeOfPoint(playerid, 3.0,234.9487,165.0764,1003.0300))
        {//LVMPD
            if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                format(string, sizeof(string), "%s is a wanted individual, and is surrendering at your station(LVMPD)!", GetPlayerNameEx(playerid));
                SendRadioMessage(19, DEPTRADIO, string);
             }
            return 1;
        }
     }
    return 0;
}
pawn Код:
else if(IsPlayerInRangeOfPoint(playerid, 3.0,234.9487,165.0764,1003.0300))
        {//LVMPD
            if(PlayerInfo[playerid][pWantedLevel] >= 1)
             {
                format(string, sizeof(string), "%s is a wanted individual, and is surrendering at your station(LVMPD)!", GetPlayerNameEx(playerid));
                SendRadioMessage(19, DEPTRADIO, string);
             }
            return 1;
        }
     }
    return 0;
}
pawn Код:
///////////////////// TURN IN POINTS /////////////////////
    CreateDynamic3DTextLabel("/turnin",COLOR_DBLUE, 240.8950, 112.7382, 1003.2188,4.0);///turnin(LAPD)
    CreatePickup(1247, 23, 240.8950, 112.7382, 1003.2188, -1); // LAPD Turnin
    CreateDynamic3DTextLabel("/turnin",COLOR_DBLUE, 2531.3040, -1659.8525,562.8000,4.0);///turnin(LASD)
    CreatePickup(1247, 23, 2531.3040, -1659.8525, 562.8000, -1); // LASD Turnin
    CreateDynamic3DTextLabel("/turnin",COLOR_DBLUE, 234.9487, 165.0764, 1003.0300,4.0);///turnin(LVMPD)
    CreatePickup(1247, 23, 234.9487, 165.0764, 1003.0300, -1); // LVMPD Turnin



Re: Scripting Help: I get 12 warnings - Samieastwood - 22.11.2014

should i replace yours by mine and thats it?