SA-MP Forums Archive
Moving gates problem ! It's FilterScript ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Moving gates problem ! It's FilterScript ! (/showthread.php?tid=80754)



Moving gates problem ! It's FilterScript ! - Kirchhoff - 06.06.2009

Hi..I made a filterscript with 1 moving gates ... But now i wanna add another moving gate into that filterscript ! So... this is my filterscript and i will post my errors too !

pawn Код:
#include <a_samp>
new gate;
new Pwla;

#define COLOR_YELLOW 0xFFFF00AA
public OnFilterScriptInit ()
{
  gate = CreateObject(971,-3361.159,28.543,7.073,0.0,0.0,-90.000);
    Pwla = CreateObject(975,1245.174,-767.056,92.753,0.0,0.0,0.0);
  return 1;
}

public OnPlayerCommandText (playerid, cmdtext[])
{
  if (strcmp(cmdtext, "/adminopen2", true) == 0)
  {
    MoveObject(gate, -3361.159,28.543,13.648,3);
    SendClientMessage(playerid, COLOR_YELLOW,"Welcome to V.I.P Base !");
    return 1;
  }
  if (strcmp(cmdtext, "/adminclose2", true) == 0)
  {
    MoveObject(gate, -3361.159,28.543,7.073,3);
    SendClientMessage(playerid, COLOR_YELLOW,"GoodBye and come back to V.I.P base");
    return 1;
  }

return 0;
}

{
  if (strcmp(cmdtext, "/mdo", true) == 0)
  {
    MoveObject(gate, 1245.174,-767.056,98.028,3);
    SendClientMessage(playerid, COLOR_YELLOW,"Hello");
    return 1;
  }
  if (strcmp(cmdtext, "/mdc", true) == 0)
  {
    MoveObject(gate, 174,-767.056,92.753,3);
    SendClientMessage(playerid, COLOR_YELLOW,"GoodBye");
    return 1;
  }

return 0;
}
And these are my errors :
pawn Код:
C:\SAMPSE~1\FILTER~1\Agates.pwn(28) : warning 217: loose indentation
C:\SAMPSE~1\FILTER~1\Agates.pwn(31) : error 055: start of function body without function header
C:\SAMPSE~1\FILTER~1\Agates.pwn(32) : error 010: invalid function or declaration
C:\SAMPSE~1\FILTER~1\Agates.pwn(36) : error 010: invalid function or declaration
C:\SAMPSE~1\FILTER~1\Agates.pwn(38) : error 010: invalid function or declaration
C:\SAMPSE~1\FILTER~1\Agates.pwn(42) : error 010: invalid function or declaration
C:\SAMPSE~1\FILTER~1\Agates.pwn(45) : error 010: invalid function or declaration
C:\SAMPSE~1\FILTER~1\Agates.pwn(9) : warning 204: symbol is assigned a value that is never used: "Pwla"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
Please explain what have i dont wrong and tell me please !



Re: Moving gates problem ! It's FilterScript ! - farse - 06.06.2009

Код:
#include <a_samp>
new gate;
new Pwla;

#define COLOR_YELLOW 0xFFFF00AA
public OnFilterScriptInit ()
{
  gate = CreateObject(971,-3361.159,28.543,7.073,0.0,0.0,-90.000);
	Pwla = CreateObject(975,1245.174,-767.056,92.753,0.0,0.0,0.0);
  return 1;
}

public OnPlayerCommandText (playerid, cmdtext[])
{
  if (strcmp(cmdtext, "/adminopen2", true) == 0)
  {
    MoveObject(gate, -3361.159,28.543,13.648,3);
    SendClientMessage(playerid, COLOR_YELLOW,"Welcome to V.I.P Base !");
    return 1;
  }
  if (strcmp(cmdtext, "/adminclose2", true) == 0)
  {
    MoveObject(gate, -3361.159,28.543,7.073,3);
    SendClientMessage(playerid, COLOR_YELLOW,"GoodBye and come back to V.I.P base");
    return 1;
  }
  if (strcmp(cmdtext, "/mdo", true) == 0)
  {
    MoveObject(gate, 1245.174,-767.056,98.028,3);
    SendClientMessage(playerid, COLOR_YELLOW,"Hello");
    return 1;
  }
  if (strcmp(cmdtext, "/mdc", true) == 0)
  {
    MoveObject(gate, 174,-767.056,92.753,3);
    SendClientMessage(playerid, COLOR_YELLOW,"GoodBye");
    return 1;
  }

	return 0;
}
But You haven't used the symbol / object "Pwla"


Re: Moving gates problem ! It's FilterScript ! - Kirchhoff - 06.06.2009

And what did you changed can you tell me ? please ?! i try it now but i wanna do it by myself !


Re: Moving gates problem ! It's FilterScript ! - Kirchhoff - 06.06.2009

I use there pwla beside gate but no work still 6 error anything else ?


Re: Moving gates problem ! It's FilterScript ! - Kirchhoff - 06.06.2009

Oh i figured it out now srry ! Ty