Gate error
#1

Hey guys,

I am trying to make a rp script and I have been trying to get moving objects so I can have gates for factions like FD but the problem is I keep getting errors

Код:
C:\Users\Calum Smith\Desktop\LA-RP\filterscripts\gates.pwn(10) : error 017: undefined symbol "obj"
C:\Users\Calum Smith\Desktop\LA-RP\filterscripts\gates.pwn(23) : error 017: undefined symbol "obj"
C:\Users\Calum Smith\Desktop\LA-RP\filterscripts\gates.pwn(30) : error 017: undefined symbol "obj"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
and heres my codes for it

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

new obj;
#endif

public OnFilterScriptInit()
{
    obj = CreateObject(5422, -2086.65, -2445.02, 31.02,   0.00, 0.00, 51.43);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/open", true)){
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2086.65, -2445.02, 27.59)){
            MoveObject(obj, -2086.65, -2445.02, 27.59, 3.0, 0.0, 0.0, 0.0);
            SendClientMessage(playerid, 0x0000BBAA, "the Gate Opened Successfuly , Weclome !");
            return 1;
        }
    }
    if(!strcmp(cmdtext, "/close", true)){
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2086.65, -2445.02, 27.59)){
            MoveObject(obj, -2086.65, -2445.02, 31.02, 3.0, 0.0, 0.0, 0.0);
            SendClientMessage(playerid, 0xAA3333AA, "the Gate Closed successfuly !");
            return 1;
        }
    }
    return 0;
}
Can anyone please help me?
Reply
#2

Delete #if defined FILTERSCRIPT
and #endif
Reply
#3

thanks
Reply
#4

No problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)