Errors With GATE :?? :/[FIXED]
#1

pawn Код:
new brama1;
new brama2;
new brama3;
new brama4;
pawn Код:
brama1 = CreateObject(988, 2564.7642, 1484.3143, 10.7187, 0, 0, 0);
    brama2 = CreateObject(988, 2570.2002, 1484.3293, 10.7109, 0, 0, 0);
    brama3 = CreateObject(988, 2504.5476, 1603.1348, 10.7109, 0, 0, 179.5182);
    brama4 = CreateObject(988, 2509.9954, 1603.111, 10.7187, 0, 0, 180);
pawn Код:
forward brama();

public brama();
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue;
        {
            if (IsPlayerAdmin(i) && PlayerToPoint(10, i, 2567.2400,1483.1750,10.6719))
            {
                MoveObject(brama1, 2559.3506, 1484.3143, 10.7187, 2.5);
                MoveObject(brama2, 2575.5947, 1484.3293, 10.7109, 2.5);
                return 1;
            }
            else
            {
                MoveObject(brama1, 2564.7642, 1484.3143, 10.7187, 2.5);
                MoveObject(brama2, 2570.2002, 1484.3293, 10.7109, 2.5);
                return 1;
            }

            if (IsPlayerAdmin(i) && PlayerToPoint(10, i, 2507.3911,1603.2407,10.6748))
            {
                MoveObject(brama3, 2499.1521, 1603.1348, 10.7109, 2.5);
                MoveObject(brama4, 2515.4158, 1603.111, 10.7187, 2.5);
                return 1;
            }
            else
            {
                MoveObject(brama3, 2504.5476, 1603.1348, 10.7109, 2.5);
                MoveObject(brama4, 2509.9954, 1603.111, 10.7187, 2.5);
                return 1;
            }
        }
    }
return 0;
}
And i get this errors

Код:
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4932) : error 055: start of function body without function header
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4933) : error 010: invalid function or declaration
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4935) : error 010: invalid function or declaration
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4937) : error 010: invalid function or declaration
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4941) : error 010: invalid function or declaration
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4943) : error 010: invalid function or declaration
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4947) : error 010: invalid function or declaration
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4950) : error 010: invalid function or declaration
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4954) : error 010: invalid function or declaration
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4956) : error 010: invalid function or declaration
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4960) : error 010: invalid function or declaration
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4964) : error 010: invalid function or declaration
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(3352) : warning 204: symbol is assigned a value that is never used: "brama1"
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(3353) : warning 204: symbol is assigned a value that is never used: "brama2"
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(3354) : warning 204: symbol is assigned a value that is never used: "brama3"
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(3355) : warning 204: symbol is assigned a value that is never used: "brama4"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply
#2

And where do you have those pieces of code placed ?
Reply
#3


pawn Код:
//top
new brama1;
new brama2;
new brama3;
new brama4;
pawn Код:
//under
//public OnGameModeInit()

    brama1 = CreateObject(988, 2564.7642, 1484.3143, 10.7187, 0, 0, 0);
    brama2 = CreateObject(988, 2570.2002, 1484.3293, 10.7109, 0, 0, 0);
    brama3 = CreateObject(988, 2504.5476, 1603.1348, 10.7109, 0, 0, 179.5182);
    brama4 = CreateObject(988, 2509.9954, 1603.111, 10.7187, 0, 0, 180);
pawn Код:
//at the bottom of my map
forward brama();

public brama();
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue;
        {
            if (IsPlayerAdmin(i) && PlayerToPoint(10, i, 2567.2400,1483.1750,10.6719))
            {
                MoveObject(brama1, 2559.3506, 1484.3143, 10.7187, 2.5);
                MoveObject(brama2, 2575.5947, 1484.3293, 10.7109, 2.5);
                return 1;
            }
            else
            {
                MoveObject(brama1, 2564.7642, 1484.3143, 10.7187, 2.5);
                MoveObject(brama2, 2570.2002, 1484.3293, 10.7109, 2.5);
                return 1;
            }

            if (IsPlayerAdmin(i) && PlayerToPoint(10, i, 2507.3911,1603.2407,10.6748))
            {
                MoveObject(brama3, 2499.1521, 1603.1348, 10.7109, 2.5);
                MoveObject(brama4, 2515.4158, 1603.111, 10.7187, 2.5);
                return 1;
            }
            else
            {
                MoveObject(brama3, 2504.5476, 1603.1348, 10.7109, 2.5);
                MoveObject(brama4, 2509.9954, 1603.111, 10.7187, 2.5);
                return 1;
            }
        }
    }
return 0;
}
Reply
#4

pawn Код:
public brama()
Reply
#5

Quote:
Originally Posted by dice7
pawn Код:
public brama()
you what?
Reply
#6

oh thx changed it but i still get one warning

Код:
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(4978) : warning 225: unreachable code
line 4978:

Код:
			if (IsPlayerAdmin(i) && PlayerToPoint(10, i, 2507.3911,1603.2407,10.6748))
Reply
#7

FIXED

pawn Код:
forward brama();

public brama()
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue;
        {
            if (IsPlayerAdmin(i) && PlayerToPoint(10, i, 2567.2400,1483.1750,10.6719))
            {
                MoveObject(brama1, 2559.3506, 1484.3143, 10.7187, 2.5);
                MoveObject(brama2, 2575.5947, 1484.3293, 10.7109, 2.5);
                return 1;
            }
            else
            {
                MoveObject(brama1, 2564.7642, 1484.3143, 10.7187, 2.5);
                MoveObject(brama2, 2570.2002, 1484.3293, 10.7109, 2.5);
                return 1;
            }
        }
    }
return 0;
}

forward bramaa();

public bramaa()
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue;
        {
            if (IsPlayerAdmin(i) && PlayerToPoint(10, i, 2507.3911,1603.2407,10.6748))
            {
                MoveObject(brama3, 2499.1521, 1603.1348, 10.7109, 2.5);
                MoveObject(brama4, 2515.4158, 1603.111, 10.7187, 2.5);
                return 1;
            }
            else
            {
                MoveObject(brama3, 2504.5476, 1603.1348, 10.7109, 2.5);
                MoveObject(brama4, 2509.9954, 1603.111, 10.7187, 2.5);
                return 1;
            }
        }
    }
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)