Can someone help fix this for me.
#1

Код:
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(655) : warning 217: loose indentation
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(656) : warning 217: loose indentation
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(14874) : error 036: empty statement
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(14876) : error 001: expected token: ")", but found "-identifier-"
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(14878) : error 029: invalid expression, assumed zero
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(14882) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Command:
Код:
CMD:garage(playerid, params[]) {
		if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1); {
	 	if(IsPlayerInRangeOfPoint(playerid, 5, -2286.9431,2284.1853,4.9731)
	 		SetPlayerPos(playerid, 1588.7703,-1640.3796,13.1978);
		}
		else {
			SendClientMessage(playerid, COLOR_RED, "You are not in the PD, Therefore cannot enter the garage.");
		}
	}
	return 1;
}
EDIT: I fixed the warnings, I just now got the errors.
Reply
#2

You have a semi-colon at the end of an if statement which is not required (2nd line), also please indent your code properly so we can read it (and you can), for example:

pawn Код:
CMD:garage(playerid, params[])
{
    if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5, -2286.9431,2284.1853,4.9731)) SetPlayerPos(playerid, 1588.7703,-1640.3796,13.1978);
    }
    else SendClientMessage(playerid, COLOR_RED, "You are not in the PD, Therefore cannot enter the garage.");
    return 1;
}
Now isn't that easier to read and spot your extra brackets and/or missing brackets?
Reply
#3

PHP код:
CMD:garage(playeridparams[])
{
    if(
groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1);
    {
         if(
IsPlayerInRangeOfPoint(playerid5, -2286.9431,2284.1853,4.9731SetPlayerPos(playerid1588.7703,-1640.3796,13.1978);
    }
    else
    {
        
SendClientMessage(playeridCOLOR_RED"You are not in the PD, Therefore cannot enter the garage.");
    }
    return 
1;

That's for one but between your errors There are 14'200 lines so it's not all on this part of code
Reply
#4

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
PHP код:
CMD:garage(playeridparams[])
{
    if(
groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1);
    {
         if(
IsPlayerInRangeOfPoint(playerid5, -2286.9431,2284.1853,4.9731SetPlayerPos(playerid1588.7703,-1640.3796,13.1978);
    }
    else
    {
        
SendClientMessage(playeridCOLOR_RED"You are not in the PD, Therefore cannot enter the garage.");
    }
    return 
1;

That's for one but between your errors There are 14'200 lines so it's not all on this part of code
Semicolons generally state the end of a statement. The if statement assumes that a statement declared within parenthesis are to be called.
Reply
#5

Aha yeah it is and I get this error:
Код:
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(14877) : error 001: expected token: ")", but found "-identifier-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

Sorry the if statement was missing a closing bracket, it should be:

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 5, -2286.9431,2284.1853,4.9731))
Reply
#7

it worked but even normal people can enter it :/
Reply
#8

It's going where the other commands are.
Reply
#9

So do you know how to make this cops only?
Код:
CMD:garage(playerid, params[])
{
    if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5, -2286.9431,2284.1853,4.9731)) SetPlayerPos(playerid, 1588.7703,-1640.3796,13.1978);
    }
    else SendClientMessage(playerid, COLOR_RED, "You are not in the PD, Therefore cannot enter the garage.");
    return 1;
}
Reply
#10

Citizens can still go in the garage.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)