Error with my script -
CallumDaBest - 23.03.2014
Код:
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;
}
Re: Error with my script -
MP2 - 23.03.2014
Are we meant to magically guess what your code is?
Re: Error with my script -
CallumDaBest - 23.03.2014
Please help
Re: Error with my script -
MythicalMarauder - 23.03.2014
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;
}
Re: Error with my script -
Hanuman - 23.03.2014
where are u using IsAtTurnInPoint?
Re: Error with my script -
Sojo12 - 23.03.2014
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!
Re: Error with my script -
Konstantinos - 23.03.2014
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.