error 010: invalid function or declaration
#1

Код:
C:\Users\ii\Desktop\roleplay.pwn(29915) : error 010: invalid function or declaration

Код:
CMD:gateopen(playerid, params[])
{
				if(GetPlayerSkin(playerid) == 265 || 280 || 281 || 282 || 283 || 284 || 288)
                {
                if (IsPlayerInRangeOfPoint(playerid,15,1533.4419,-1627.7628,13.4876))
                {
                                MoveObject(lspdgate1, 1539.6418457031, -1634.3499755859, 12, 2);
                                MoveObject(lspdgate2, 1539.6418457031, -1621, 12, 2);
                    SetTimer("GateClose0", 3400, 0);
                }
                else if (IsPlayerInRangeOfPoint(playerid,15,1553.3512,-1628.0248,13.4897))
                {
                    MoveObject(lspdgate3, 1549.2487792969,-1634.4000244141,12, 2);
                                MoveObject(lspdgate4, 1549.2487792969,-1621,12, 2);
                    SetTimer("PDEXIT", 3400, 0);
                }
                }
                else SendClientMessage(playerid, Message,"You are not a Police Officer");
        }
    return 1;
}
Reply
#2

try this
Код:
CMD:gateopen(playerid, params[])
{
	new skin = GetPlayerSkin(playerid);
	if(skin == 265 || skin == 280 || skin == 281 || skin == 282 || skin == 283 || skin == 284 || skin == 288)
	{
		if (IsPlayerInRangeOfPoint(playerid,15,1533.4419,-1627.7628,13.4876))
		{
			MoveObject(lspdgate1, 1539.6418457031, -1634.3499755859, 12, 2);
			MoveObject(lspdgate2, 1539.6418457031, -1621, 12, 2);
			SetTimer("GateClose0", 3400, 0);
		}
		else if (IsPlayerInRangeOfPoint(playerid,15,1553.3512,-1628.0248,13.4897))
		{
			MoveObject(lspdgate3, 1549.2487792969,-1634.4000244141,12, 2);
			MoveObject(lspdgate4, 1549.2487792969,-1621,12, 2);
			SetTimer("PDEXIT", 3400, 0);
		}
	}
	else SendClientMessage(playerid, Message, "You are not a Police Officer");
	return 1;
}
Reply
#3

Quote:
Originally Posted by alexanderjb918
Посмотреть сообщение
Код:
C:\Users\ii\Desktop\roleplay.pwn(29915) : error 010: invalid function or declaration

Код:
CMD:gateopen(playerid, params[])
{
				if(GetPlayerSkin(playerid) == 265 || 280 || 281 || 282 || 283 || 284 || 288)
                {
                if (IsPlayerInRangeOfPoint(playerid,15,1533.4419,-1627.7628,13.4876))
                {
                                MoveObject(lspdgate1, 1539.6418457031, -1634.3499755859, 12, 2);
                                MoveObject(lspdgate2, 1539.6418457031, -1621, 12, 2);
                    SetTimer("GateClose0", 3400, 0);
                }
                else if (IsPlayerInRangeOfPoint(playerid,15,1553.3512,-1628.0248,13.4897))
                {
                    MoveObject(lspdgate3, 1549.2487792969,-1634.4000244141,12, 2);
                                MoveObject(lspdgate4, 1549.2487792969,-1621,12, 2);
                    SetTimer("PDEXIT", 3400, 0);
                }
                }
                else SendClientMessage(playerid, Message,"You are not a Police Officer");
        }
    return 1;
}
This is the second time within 3 days you posts a problem like this.
Can you do me a favour and count all opening brackets(these things: { ) and all closing brackets(these: } ).
Now, common sense, if these 2 variables are not equal to eachother, what should you do then?



And please people of the samp community, dont just copy & paste his codings and post it back the right way. This way you can help him with basic stuff like this every day. Let him learn from this.(I'm looking at you Startukk)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)