Help Please
#1

Warning:tag mismatch
Line:
PHP код:
LandInfo[l][landObjects][v] = CreateDynamicObject(objectInfo[v][objectModel], objectInfo[v][oPosX], objectInfo[v][oPosY], objectInfo[v][oPosZ], objectInfo[v][oRotX], objectInfo[v][oRotY], objectInfo[v][oRotZ], .streamdistance 150); 
Reply
#2

I am not sure about this
Код:
, .streamdistance = 150
Try deleting that because streamdistance is already defined inside include...
Reply
#3

Ok I delted But Same Prob
PHP код:
if(objectInfo[v][oModel] != && objectInfo[v][oPosX] != 0.0 && objectInfo[v][oPosY] != 0.0 && objectInfo[v][oPosZ] != 0.0
Reply
#4

Код:
LandInfo[l][landObjects][v] = CreateDynamicObject(objectInfo[v][objectModel], objectInfo[v][oPosX], objectInfo[v][oPosY], objectInfo[v][oPosZ], objectInfo[v][oRotX], objectInfo[v][oRotY], objectInfo[v][oRotZ], 150);
Reply
#5

Are oPosX, oPosY, oPosZ, oRotX, oRotY and oRotZ declared as floats?

PHP код:
enum E_OBJECT_DATA {

    
Float:oPosX,
    
Float:oPosY,
    
Float:oPosZ,
    
Float:oRotX,
    
Float:oRotY,
    
Float:oRotZ
};
new 
objectInfo[MAX_OBJECTS][E_OBJECT_DATA
Reply
#6

Sloved Thaks All For Help
Reply
#7

LOL i got another Warning warning 202: number of arguments does not match definition
PHP код:
            if(IsPlayerInGangZone(LandInfo[i][landZone]))//69403
            
{
                for(new 
0251++)
                {
                    new 
Float:Pos[3];
                    new 
Float:Rot[3];
                    if(
IsValidDynamicObject(LandInfo[i][landObjects][x]))
                    {
                        
GetDynamicObjectPos(LandInfo[i][landObjects][x], Pos[0], Pos[1], Pos[2]);
                        
GetDynamicObjectRot(LandInfo[i][landObjects][x], Rot[0], Rot[1], Rot[2]);
                        if(
IsPlayerInRangeOfPoint(playeridPos[0], Pos[1], Pos[2], 6.0))
                        {
                            if(
objectInfo[x][oDoor] == 1)
                            {
                                if(
strcmp(playernameLandInfo[i][landOwner], true) == || PlayerInfo[playerid][pLandPerms] >= && PlayerInfo[playerid][pEditLand] == || TempLandPerm[playerid] == i)
                                {
                                    if(
objectInfo[x][oDoorOpen] == 0)
                                    {
                                        
SetDynamicObjectRot(LandInfo[i][landObjects][x], Rot[0], 90.0Rot[2]);
                                        
objectInfo[x][oDoorOpen] = 0;
                                    }
                                    else
                                    {
                                        
SetDynamicObjectRot(LandInfo[i][landObjects][x], objectInfo[x][oRotX], objectInfo[x][oRotY], objectInfo[x][oRotZ]);
                                        
objectInfo[x][oDoorOpen] = 1;
                                    }
                                }
                                else 
SendClientMessage(playeridCOLOR_GREY"You do not own this land or have permission to open this door");
                            }
                            else if(
objectInfo[x][oDoor] == 2)
                            {
                                if(
strcmp(playernameLandInfo[i][landOwner], true) == || PlayerInfo[playerid][pLandPerms] >= && PlayerInfo[playerid][pEditLand] == || TempLandPerm[playerid] == i)
                                {
                                    if(
objectInfo[x][oDoorOpen] == 0)
                                    {
                                        
MoveDynamicObject(LandInfo[i][landObjects][x], Pos[0], Pos[1], Pos[2]+350.0Rot[0], Rot[1], 90.0);
                                        
objectInfo[x][oDoorOpen] = 0;
                                    }
                                    else
                                    {
                                        
MoveDynamicObject(LandInfo[i][landObjects][x], objectInfo[x][oPosX], objectInfo[x][oPosY], objectInfo[x][oPosZ], 50.0objectInfo[x][oRotX], objectInfo[x][oRotY], objectInfo[x][oRotZ]);
                                        
objectInfo[x][oDoorOpen] = 1;
                                        }
                                }
                                else 
SendClientMessage(playeridCOLOR_GREY"You do not own this land or have permission to open this door.");
                            }
                        }
                    }
                }
            }
        }
        
// END OF LAND DOORS!
    
}
    return 
1;

Reply
#8

What i must do?
Reply
#9

Код:
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;
}
Код:
 if(isPlayerInArea(playerid,LandInfo[i][landZone]))//69403
            {
Reply
#10

How Is this
PHP код:
IsPlayerInArea(playeridFloat:MinXFloat:MinYFloat:MaxXFloat:MaxY)
{
    new 
Float:XFloat:YFloat:Z;

    
GetPlayerPos(playeridXYZ);
    if(
>= MinX && <= MaxX && >= MinY && <= MaxY) {
        return 
1;
    }
    return 
0;

How to replace them Here
PHP код:
        // LAND DOORS!
        
for(new 0MAX_LANDSi++)
        {
            new 
playername[MAX_PLAYER_NAME];
            
GetPlayerName(playeridplayernamesizeof(playername));
              if(
IsPlayerInGangZone(LandInfo[i][landZone]))//69403
            
{
                for(new 
0251++)
                {
                    new 
Float:Pos[3];
                    new 
Float:Rot[3];
                    if(
IsValidDynamicObject(LandInfo[i][landObjects][x]))
                    {
                        
GetDynamicObjectPos(LandInfo[i][landObjects][x], Pos[0], Pos[1], Pos[2]);
                        
GetDynamicObjectRot(LandInfo[i][landObjects][x], Rot[0], Rot[1], Rot[2]);
                        if(
IsPlayerInRangeOfPoint(playeridPos[0], Pos[1], Pos[2], 6.0))
                        {
                            if(
objectInfo[x][oDoor] == 1)
                            {
                                if(
strcmp(playernameLandInfo[i][landOwner], true) == || PlayerInfo[playerid][pLandPerms] >= && PlayerInfo[playerid][pEditLand] == || TempLandPerm[playerid] == i)
                                {
                                    if(
objectInfo[x][oDoorOpen] == 0)
                                    {
                                        
SetDynamicObjectRot(LandInfo[i][landObjects][x], Rot[0], 90.0Rot[2]);
                                        
objectInfo[x][oDoorOpen] = 0;
                                    }
                                    else
                                    {
                                        
SetDynamicObjectRot(LandInfo[i][landObjects][x], objectInfo[x][oRotX], objectInfo[x][oRotY], objectInfo[x][oRotZ]);
                                        
objectInfo[x][oDoorOpen] = 1;
                                    }
                                }
                                else 
SendClientMessage(playeridCOLOR_GREY"You do not own this land or have permission to open this door");
                            }
                            else if(
objectInfo[x][oDoor] == 2)
                            {
                                if(
strcmp(playernameLandInfo[i][landOwner], true) == || PlayerInfo[playerid][pLandPerms] >= && PlayerInfo[playerid][pEditLand] == || TempLandPerm[playerid] == i)
                                {
                                    if(
objectInfo[x][oDoorOpen] == 0)
                                    {
                                        
MoveDynamicObject(LandInfo[i][landObjects][x], Pos[0], Pos[1], Pos[2]+350.0Rot[0], Rot[1], 90.0);
                                        
objectInfo[x][oDoorOpen] = 0;
                                    }
                                    else
                                    {
                                        
MoveDynamicObject(LandInfo[i][landObjects][x], objectInfo[x][oPosX], objectInfo[x][oPosY], objectInfo[x][oPosZ], 50.0objectInfo[x][oRotX], objectInfo[x][oRotY], objectInfo[x][oRotZ]);
                                        
objectInfo[x][oDoorOpen] = 1;
                                        }
                                }
                                else 
SendClientMessage(playeridCOLOR_GREY"You do not own this land or have permission to open this door.");
                            }
                        }
                    }
                }
            }
        }
        
// END OF LAND DOORS!
    
}
    return 
1;

Reply
#11

Код:
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;
}
Place that ** anywhere in your script


and replace this with ur old one.
Код:
 for(new i = 0; i < MAX_LANDS; i++)
        {
            new playername[MAX_PLAYER_NAME];
            GetPlayerName(playerid, playername, sizeof(playername));
             if(isPlayerInArea(playerid,LandInfo[i][landZone]))//69403
            {
                for(new x = 0; x < 251; x ++)
                {
                    new Float:Pos[3];
                    new Float:Rot[3];
                    if(IsValidDynamicObject(LandInfo[i][landObjects][x]))
                    {
                        GetDynamicObjectPos(LandInfo[i][landObjects][x], Pos[0], Pos[1], Pos[2]);
                        GetDynamicObjectRot(LandInfo[i][landObjects][x], Rot[0], Rot[1], Rot[2]);
                        if(IsPlayerInRangeOfPoint(playerid, Pos[0], Pos[1], Pos[2], 6.0))
                        {
                            if(objectInfo[x][oDoor] == 1)
                            {
                                if(strcmp(playername, LandInfo[i][landOwner], true) == 0 || PlayerInfo[playerid][pLandPerms] >= 1 && PlayerInfo[playerid][pEditLand] == i || TempLandPerm[playerid] == i)
                                {
                                    if(objectInfo[x][oDoorOpen] == 0)
                                    {
                                        SetDynamicObjectRot(LandInfo[i][landObjects][x], Rot[0], 90.0, Rot[2]);
                                        objectInfo[x][oDoorOpen] = 0;
                                    }
                                    else
                                    {
                                        SetDynamicObjectRot(LandInfo[i][landObjects][x], objectInfo[x][oRotX], objectInfo[x][oRotY], objectInfo[x][oRotZ]);
                                        objectInfo[x][oDoorOpen] = 1;
                                    }
                                }
                                else SendClientMessage(playerid, COLOR_GREY, "You do not own this land or have permission to open this door");
                            }
                            else if(objectInfo[x][oDoor] == 2)
                            {
                                if(strcmp(playername, LandInfo[i][landOwner], true) == 0 || PlayerInfo[playerid][pLandPerms] >= 1 && PlayerInfo[playerid][pEditLand] == i || TempLandPerm[playerid] == i)
                                {
                                    if(objectInfo[x][oDoorOpen] == 0)
                                    {
                                        MoveDynamicObject(LandInfo[i][landObjects][x], Pos[0], Pos[1], Pos[2]+3, 50.0, Rot[0], Rot[1], 90.0);
                                        objectInfo[x][oDoorOpen] = 0;
                                    }
                                    else
                                    {
                                        MoveDynamicObject(LandInfo[i][landObjects][x], objectInfo[x][oPosX], objectInfo[x][oPosY], objectInfo[x][oPosZ], 50.0, objectInfo[x][oRotX], objectInfo[x][oRotY], objectInfo[x][oRotZ]);
                                        objectInfo[x][oDoorOpen] = 1;
                                        }
                                }
                                else SendClientMessage(playerid, COLOR_GREY, "You do not own this land or have permission to open this door.");
                            }
                        }
                    }
                }
            }
        }
        // END OF LAND DOORS!
    }
    return 1;
}
Reply
#12

Got this errors
PHP код:
error 017undefined symbol "isPlayerInArea"
C:\Users\Jabber\Desktop\released script\gamemodes\yerp.pwn(85247) : error 025: function heading differs from prototype
C
:\Users\Jabber\Desktop\released script\gamemodes\yerp.pwn(85248) : error 021symbol already defined"IsPlayerInArea" 
Reply
#13

The function has 5 parameters, so you must enter 5 arguments when calling it.
Reply
#14

3Warnings:warning 202: number of arguments does not match definition on line:69414
PHP код:
        for(new 0MAX_LANDSi++)
        {
            new 
playername[MAX_PLAYER_NAME];
            
GetPlayerName(playeridplayernamesizeof(playername));
            if(
IsPlayerInArea(playerid,LandInfo[i][landZone]))//69414
            
{
                for(new 
0251++)
                {
                    new 
Float:Pos[3];
                    new 
Float:Rot[3];
                    if(
IsValidDynamicObject(LandInfo[i][landObjects][x]))
                    {
                        
GetDynamicObjectPos(LandInfo[i][landObjects][x], Pos[0], Pos[1], Pos[2]);
                        
GetDynamicObjectRot(LandInfo[i][landObjects][x], Rot[0], Rot[1], Rot[2]);
                        if(
IsPlayerInRangeOfPoint(playeridPos[0], Pos[1], Pos[2], 6.0))
                        {
                            if(
objectInfo[x][oDoor] == 1)
                            {
                                if(
strcmp(playernameLandInfo[i][landOwner], true) == || PlayerInfo[playerid][pLandPerms] >= && PlayerInfo[playerid][pEditLand] == || TempLandPerm[playerid] == i)
                                {
                                    if(
objectInfo[x][oDoorOpen] == 0)
                                    {
                                        
SetDynamicObjectRot(LandInfo[i][landObjects][x], Rot[0], 90.0Rot[2]);
                                        
objectInfo[x][oDoorOpen] = 0;
                                    }
                                    else
                                    {
                                        
SetDynamicObjectRot(LandInfo[i][landObjects][x], objectInfo[x][oRotX], objectInfo[x][oRotY], objectInfo[x][oRotZ]);
                                        
objectInfo[x][oDoorOpen] = 1;
                                    }
                                }
                                else 
SendClientMessage(playeridCOLOR_GREY"You do not own this land or have permission to open this door");
                            }
                            else if(
objectInfo[x][oDoor] == 2)
                            {
                                if(
strcmp(playernameLandInfo[i][landOwner], true) == || PlayerInfo[playerid][pLandPerms] >= && PlayerInfo[playerid][pEditLand] == || TempLandPerm[playerid] == i)
                                {
                                    if(
objectInfo[x][oDoorOpen] == 0)
                                    {
                                        
MoveDynamicObject(LandInfo[i][landObjects][x], Pos[0], Pos[1], Pos[2]+350.0Rot[0], Rot[1], 90.0);
                                        
objectInfo[x][oDoorOpen] = 0;
                                    }
                                    else
                                    {
                                        
MoveDynamicObject(LandInfo[i][landObjects][x], objectInfo[x][oPosX], objectInfo[x][oPosY], objectInfo[x][oPosZ], 50.0objectInfo[x][oRotX], objectInfo[x][oRotY], objectInfo[x][oRotZ]);
                                        
objectInfo[x][oDoorOpen] = 1;
                                        }
                                }
                                else 
SendClientMessage(playeridCOLOR_GREY"You do not own this land or have permission to open this door.");
                            }
                        }
                    }
                }
            }
        }
        
// END OF LAND DOORS!
    
}
    return 
1;

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

Reply
#15

You are only giving the function 2 out of the 5 parameters that it requires!
Reply
#16

Can You Tell me What Are the Left parametres?
Reply
#17

These are the parameters:
PHP код:
(playeridFloat:MinXFloat:MinYFloat:MaxXFloat:MaxY
Reply
#18

I have added them on this line
PHP код:
if(IsPlayerInArea(playerid,LandInfo[i][landZone], Float:MinXFloat:MinYFloat:MaxXFloat:MaxY))//69414 
But I got error
PHP код:
Undefined Symbol MinX 
Reply
#19

Quote:
Originally Posted by KochJaber
Посмотреть сообщение
I have added them on this line
PHP код:
if(IsPlayerInArea(playerid,LandInfo[i][landZone], Float:MinXFloat:MinYFloat:MaxXFloat:MaxY))//69414 
But I got error
PHP код:
Undefined Symbol MinX 
He meant it is the prototype of that function.Not the actual calling statement.Replace each arguements with corresponding values that will fit there.
Reply
#20

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
He meant it is the prototype of that function.Not the actual calling statement.Replace each arguements with corresponding values that will fit there.
I have Not unterstund Please If u can Help Me To fix It Can U Replace Them Bec IDK Where Im New Scripter
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)