Error with my script
#1

Код:
C:\Users\Gamer\Desktop\PLA.pwn(561) : warning 201: redefinition of constant/macro (symbol "INVALID_REPORT_ID")
C:\Users\Gamer\Desktop\PLA.pwn(13353) : warning 202: number of arguments does not match definition
C:\Users\Gamer\Desktop\PLA.pwn(13361) : warning 202: number of arguments does not match definition
C:\Users\Gamer\Desktop\PLA.pwn(13370) : warning 202: number of arguments does not match definition
C:\Users\Gamer\Desktop\PLA.pwn(17529) : error 025: function heading differs from prototype
C:\Users\Gamer\Desktop\PLA.pwn(17531) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17531) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17533) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17534) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17535) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17536) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17537) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17540) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17543) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17544) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17545) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17548) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17549) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17552) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17553) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17554) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17555) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17556) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17557) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17558) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17559) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17560) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17561) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17562) : error 017: undefined symbol "playerid"
C:\Users\Gamer\Desktop\PLA.pwn(17563) : error 017: undefined symbol "playerid"

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


26 Errors.
Line 561:
Код:
#define INVALID_REPORT_ID -1
Line: 13353, 13361, 13370
Код:
 IsAtTurnInPoint(playerid)
{
	new string[128];
	
	if(IsPlayerConnected(playerid))
	{
		if(IsPlayerInRangeOfPoint(playerid, 3.0,240.8950,112.7382,1003.2188,270.1587))//Line 13353
		{//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);
	     	}
		}
		else if(IsPlayerInRangeOfPoint(playerid, 4.0, 2531.3040,-1659.8525,562.8000,104.7559))// Line 13361
		{//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);
	     	}
		
		}
		else if(IsPlayerInRangeOfPoint(playerid, 3.0,234.9487,165.0764,1003.0300,80.0004))//line 13370
		{//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;
}
Reply
#2

Are we meant to magically guess what your code is?
Reply
#3

Please help
Reply
#4

pawn Код:
IsAtTurnInPoint(playerid)
{
    new string[128];
   
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0,240.8950,112.7382,1003.2188,270.1587))//Line 13353
        {//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);
            }
        }
        if(IsPlayerInRangeOfPoint(playerid, 4.0, 2531.3040,-1659.8525,562.8000,104.7559))// Line 13361
        {//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);
            }
       
        }
        if(IsPlayerInRangeOfPoint(playerid, 3.0,234.9487,165.0764,1003.0300,80.0004))//line 13370
        {//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;
}
Reply
#5

where are u using IsAtTurnInPoint?
Reply
#6

Look this will be real fucking hard to fix 'cos the exact problem is that you've missed to either open or close a brace bracket somewhere.I've experienced this before.Now if you dont remember what changes you've recently made.You're screwed!
Reply
#7

Remove this line:
pawn Код:
#define INVALID_REPORT_ID -1
in 561. It's already defined.

On those lines:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 3.0,240.8950,112.7382,1003.2188,270.1587))//Line 13353
...
else if(IsPlayerInRangeOfPoint(playerid, 4.0, 2531.3040,-1659.8525,562.8000,104.7559))// Line 13361
...
else if(IsPlayerInRangeOfPoint(playerid, 3.0,234.9487,165.0764,1003.0300,80.0004))//line 13370
warning 202: number of arguments does not match definition.

Parameters:
pawn Код:
IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z)
You've used angle (1 more argument in the function) when it doesn't exist as an argument. So change to:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 3.0,240.8950,112.7382,1003.2188))//Line 13353
...
else if(IsPlayerInRangeOfPoint(playerid, 4.0, 2531.3040,-1659.8525,562.8000))// Line 13361
...
else if(IsPlayerInRangeOfPoint(playerid, 3.0,234.9487,165.0764,1003.0300))//line 13370
About the error 025: function heading differs from prototype post the line 17529 and I assume in that callback it doesn't have "playerid" as parameter. However, just to be sure post the lines 17529-17531.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)