Problem with speedcams -
Makaak - 26.12.2013
Hi! I have problem in my script if I need to add speedcamera script
Like here! So if I add this and compile then I got errors/warnings like this:
PHP код:
(1016) : error 004: function "IsModelAPlane" is not implemented
(1017) : error 004: function "IsModelAHeli" is not implemented
(1226) : error 004: function "IsPlayerInArea" is not implemented
(2833) : warning 201: redefinition of constant/macro (symbol "COLOR_RED")
(2834) : warning 201: redefinition of constant/macro (symbol "COLOR_GREEN")
(3257) : error 025: function heading differs from prototype
(3258) : error 021: symbol already defined: "GetDistanceBetweenPoints"
(3271) : warning 202: number of arguments does not match definition
(3271) : warning 202: number of arguments does not match definition
(3378) : error 017: undefined symbol "PlayerInfo"
(3378) : warning 215: expression has no effect
(3378) : error 001: expected token: ";", but found "]"
(3378) : error 029: invalid expression, assumed zero
(3378) : fatal error 107: too many error messages on one line
How to fix them?
Re: Problem with speedcams -
Kells - 26.12.2013
show lines
Re: Problem with speedcams -
Konstantinos - 26.12.2013
Remove the line: #define COLOR_GREEN ... because it's already defined.
The parameters of the public and forward are not the same.
GetDistanceBetweenPoints already exists so remove the one from line 3258.
Declare PlayerInfo.
Re: Problem with speedcams -
Makaak - 26.12.2013
Heres my lines:
3378:
PHP код:
PlayerInfo[a][pTicket] += 2000;
3271:
PHP код:
temp = GetDistanceBetweenPoints(x,y,SpeedCameras[i][_x],SpeedCameras[i][_y]);
3258:
3257:
PHP код:
stock Float:GetDistanceBetweenPoints(Float:x,Float:y,Float:tx,Float:ty)
2834:
PHP код:
#define COLOR_GREEN 0x05FF00FF
3833:
PHP код:
#define COLOR_RED 0xFF1E00FF
1226:
PHP код:
if((1544 >= an >= 1538 || an == 1062 || an == 1250) && (Z <= 0 || (Z <= 41.0 && IsPlayerInArea(playerid, -1387, -473, 2025, 2824))) ||
1017:
PHP код:
else if(IsModelAHeli(vehicleid)) return 0;
1016:
PHP код:
if(IsModelAPlane(vehicleid)) return 0;
Re: Problem with speedcams -
Konstantinos - 26.12.2013
Did you just copy-paste them?
Declare PlayerInfo:
pawn Код:
enum _pInfo
{
// ... (more)
pTicket
};
new PlayerInfo[MAX_PLAYERS][_pInfo];
Remove the stock of GetDistanceBetweenPoints from line 3257 (and the rest of its code) because it already exists.
Remove:
pawn Код:
#define COLOR_GREEN 0x05FF00FF
#define COLOR_RED 0xFF1E00FF
Add it to the bottom:
pawn Код:
IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) {
return 1;
}
return 0;
}
For IsModelAPlane and IsModelAHeli, ****** them.
Re: Problem with speedcams -
Makaak - 26.12.2013
I allready hae this:
PHP код:
IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) {
return 1;
}
return 0;
}
Re: Problem with speedcams -
[WA]iRonan - 26.12.2013
Can you show 3257? You probably forgot the ";" there.
Re: Problem with speedcams -
Kells - 26.12.2013
correct this
Код:
stock Float:GetDistanceBetweenPoints(Float:x,Float:y,Float:tx,Float:ty)
and put it to this
Код:
stock Float:GetDistanceBetweenPoints(Float:x,Float:y,Float:tx,Float:ty);
and try