/drag cmd script compiling error
#1

I tried to put this filterscript into my NE:RP edit, and I got these errors:
NERP.pwn(73102) : error 029: invalid expression, assumed zero
NERP.pwn(73102 -- 73103) : error 029: invalid expression, assumed zero
NERP.pwn(73103 -- 73104) : error 029: invalid expression, assumed zero
NERP.pwn(73103 -- 73104) : fatal error 107: too many error messages on one line

if(PlayerInfo[playerid][pMember] == 3 is line 73102


This is the code:
Quote:

CMD:drag (playerid, params[])

{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 ||
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 ||
if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7 ||
if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 ||
if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 ||
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, GREY, "CMD:/cuff [playerid]");
if(pCuffed[ID] == 0) return SendClientMessage(playerid, GREY, "This player must first be cuffed");
if(Dragged[ID] == 0 && Dragging[playerid] == 0)
{
Dragged[ID] = 1;
Dragging[playerid] = 1;
format(string, sizeof(string), "You are being dragged by %s.", RemoveUnderScore(playerid));
format(string2, sizeof(string2), " You are dragging %s.", RemoveUnderScore(ID));
SCM(playerid, PURPLE, string2);
SCM(ID, PURPLE, string);
draggedtimer[ID] = SetTimerEx("Draggingt", 1000, 1, "dd", playerid,ID);
}
else
{
Dragged[ID] = 0;
Dragging[playerid] = 0;
SCM(playerid, PURPLE, "You have stopped dragging your target.");
SCM(ID, PURPLE, "You aren't being dragged anymore.");
KillTimer(draggedtimer[ID]);
}
return 1;
}

forward Draggingt(playerid, ID);
public Draggingt(playerid, ID)
{
new Float:dX, Float:dY, Float:dZ;
GetPlayerPos(playerid, dX, dY, dZ);
SetPlayerPos(ID, dX+1, dY, dZ);
}

Reply
#2

pawn Код:
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 );// you forget to close your if condition use this ');' to close it.
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 );// here also u forget to close it
if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7);// here also
if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11); // here also u forget
if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13); // here also u forget to close it
Reply
#3

Just use

pawn Код:
if(PlayerInfo[playerid][pMember] >= 1 && PlayerInfo[playerid][pLeader] >= 1)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)