Gate command
#7

i'll have a go with your way then
edit: i tried it in my gamemode and got errors.
so i then tried in just a blank script and got the same errors.
thats the full code there:
Код:
#include <a_samp>
new maingate;
new GateStat;

public OnGameModeInit()
{
	maingate = CreateObject(987,2894.78100586,2114.12182617,10.81382370,0.00000000,0.00000000,268.98352051);
	GateStat = 0;
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/main", cmdtext) == 0)
    {
        if(GateStat = 0) //If gate is closed
        {
            GateStat = 1; //Gate = Open
            MoveObject(maingate, 2894.61962891,2106.19311523,10.81382370, 2.500000); //To open
            return 1;
        }
        else if(GateStat = 1) //If gate is open
        {
            GateStat = 0; //Gate = Closed
            MoveObject(maingate, 2894.78100586,2114.12182617,10.81382370, 2.500000); //To closed
            return 1;
        }
	return 1;
}
Код:
C:\Users\Mike\Desktop\Samp 0.3 Server\filterscripts\gates.pwn(9) : warning 217: loose indentation
C:\Users\Mike\Desktop\Samp 0.3 Server\filterscripts\gates.pwn(16) : warning 211: possibly unintended assignment
C:\Users\Mike\Desktop\Samp 0.3 Server\filterscripts\gates.pwn(22) : warning 211: possibly unintended assignment
C:\Users\Mike\Desktop\Samp 0.3 Server\filterscripts\gates.pwn(28) : warning 217: loose indentation
C:\Users\Mike\Desktop\Samp 0.3 Server\filterscripts\gates.pwn(30) : error 030: compound statement not closed at the end of file (started at line 14)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
but isnt that closed or what?
Reply


Messages In This Thread
Gate command - by Hobod - 04.08.2010, 01:09
Re: Gate command - by cofy1 - 04.08.2010, 01:25
Re: Gate command - by Hobod - 04.08.2010, 01:31
Re: Gate command - by Daren_Jacobson - 04.08.2010, 01:37
Re: Gate command - by Hobod - 04.08.2010, 12:44
Re: Gate command - by Ash. - 04.08.2010, 13:02
Re: Gate command - by Hobod - 04.08.2010, 17:37
Re: Gate command - by Daren_Jacobson - 04.08.2010, 18:00
Re: Gate command - by Hobod - 04.08.2010, 20:41
Re: Gate command - by JaTochNietDan - 04.08.2010, 21:36

Forum Jump:


Users browsing this thread: 1 Guest(s)