Problem with speedcams
#1

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 201redefinition of constant/macro (symbol "COLOR_RED")
(
2834) : warning 201redefinition of constant/macro (symbol "COLOR_GREEN")
(
3257) : error 025: function heading differs from prototype
(3258) : error 021symbol already defined"GetDistanceBetweenPoints"
(3271) : warning 202number of arguments does not match definition
(3271) : warning 202number of arguments does not match definition
(3378) : error 017undefined symbol "PlayerInfo"
(3378) : warning 215expression has no effect
(3378) : error 001expected token";"but found "]"
(3378) : error 029invalid expressionassumed zero
(3378) : fatal error 107too many error messages on one line 
How to fix them?
Reply
#2

show lines
Reply
#3

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.
Reply
#4

Heres my lines:

3378:
PHP код:
PlayerInfo[a][pTicket] += 2000
3271:
PHP код:
temp GetDistanceBetweenPoints(x,y,SpeedCameras[i][_x],SpeedCameras[i][_y]); 
3258:
PHP код:

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) && (<= || (<= 41.0 && IsPlayerInArea(playerid, -1387, -47320252824))) || 
1017:
PHP код:
else if(IsModelAHeli(vehicleid)) return 0
1016:
PHP код:
if(IsModelAPlane(vehicleid)) return 0
Reply
#5

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.
Reply
#6

I allready hae this:

PHP код:
IsPlayerInArea(playeridFloat:MinXFloat:MinYFloat:MaxXFloat:MaxY)
{
    new 
Float:XFloat:YFloat:Z;
    
GetPlayerPos(playeridXYZ);
    if(
>= MinX && <= MaxX && >= MinY && <= MaxY) {
        return 
1;
    }
    return 
0;

Reply
#7

Can you show 3257? You probably forgot the ";" there.
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)