Gate wont work!
#1

Hello my gate wont work and i dont now why? :S i have included

Include List
Код:
#include <a_samp>
#include <streamer>
#include <sscanf2>
#include <Dini>
Top of the script
Код:
new FBIgate; //The Gate object when its Closed!
new FBIgate1 = 0;
my script
Код:
public OnGameModeInit()
{
	FBIgate = CreateObject(968, 1544.6943359375, -1630.73046875, 13.27956199646, 0.000000, 90, 90); // The gate you made when its CLOSED!!
	return 1;
}
Scripts
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/FBIGATE", true) == 0)
{
	if(IsPlayerInRangeOfPoint(playerid,9,1589.00000000,-1637.90002441,15.19999981))// This has to be the first 3 Coordinates of the gate when its Closed!
	    { //FBI GATE
 			if(FBIGATE1==0)
    			{
     				FBIGATE1 = 1;
       				MoveObject(FBIGATE, 1589.00000000,-1637.90002441,8.30000019, 1.0);// Coordinates THIS IS WHEN ITS OPEN!
       			}
	    		else if(FBIGATE1==1)
		   	{
		       		FBIGATE1 = 0; //
		       		MoveObject(FBIGATE,1589.00000000,-1637.90002441,15.19999981, 1.0);//This has to be the same as "InRangeOfPoint"  AND WHEN THE GATE IS CLOSED!
			}
			return 1;
		}
	}
	return 1;
}
Errors
Код:
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(101) : error 017: undefined symbol "FBIGATE1"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(103) : error 017: undefined symbol "FBIGATE1"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(103) : warning 215: expression has no effect
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(104) : error 017: undefined symbol "FBIGATE"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(106) : error 017: undefined symbol "FBIGATE1"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(108) : error 017: undefined symbol "FBIGATE1"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(108) : warning 215: expression has no effect
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(109) : error 017: undefined symbol "FBIGATE"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(114) : warning 217: loose indentation
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(42) : warning 204: symbol is assigned a value that is never used: "FBIgate"
C:\Users\showarn\Desktop\Gta server frеn scratch\gamemodes\erp.pwn(42 -- 251) : warning 203: symbol is never used: "FBIgate1"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.

if any1 cud help me that wud be cool since i guess this is a simple problem :P
Reply
#2

You declared FBIgate ?
Reply
#3

new FBIGATE1;

on the top
Reply
#4

i just had to forgott to write it in this thread but i have already done that

i already have this
Код:
//news
new FBIgate; //The Gate object when its Closed!
new FBIgate1 = 0;
Reply
#5

It is case-sensitive.
This should work
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/FBIGATE", true) == 0)
{
    if(IsPlayerInRangeOfPoint(playerid,9,1589.00000000,-1637.90002441,15.19999981))// This has to be the first 3 Coordinates of the gate when its Closed!
        { //FBI GATE
            if(FBIgate1==0)
                {
                    FBIgate1 = 1;
                    MoveObject(FBIgate, 1589.00000000,-1637.90002441,8.30000019, 1.0);// Coordinates THIS IS WHEN ITS OPEN!
                }
                else if(FBIgate1==1)
            {
                    FBIgate1 = 0; //
                    MoveObject(FBIgate,1589.00000000,-1637.90002441,15.19999981, 1.0);//This has to be the same as "InRangeOfPoint"  AND WHEN THE GATE IS CLOSED!
            }
            return 1;
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)