Problem ON gate scripting
#1

C:\Users\Nouman\Downloads\Documents\Nnnm\nnn\gamem odes\Ncnr.pwn(20011) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.


Код:
forward GateCheck();
public GateCheck()
{
  for(new i; i < MAX_PLAYERS; i++) // Start the loop
  {
    if(IsPlayerInRangeOfPoint(i, 15.0, 2334.5737,2443.9558,5.6758)) //Check if any player is in the area. Replace '8.0, 3.0, 10.0' with your own coordinates of your closed gate.
    {
      if(gateopen == false) // If the gate isn't open...
      {
      MoveObject(gate, 2324.5637,2443.9558,5.6758); //Then open it! Change '32.0, 12.0, 10.0' to the coordinates of your opened gate.
      gateopen = true; // Setting this to true indicates it's open(ing)
      }
      return; //This closes the callback
    }
  }
  //This is called if nobody has been found near the gate. Obviously, because 'return' would fully close the function and this wouldn't be used then.
  if(gateopen == true) //If the gate IS open, but there's no one near..
  {
    MoveObject(gate, 2334.5637,2443.9558,5.6758, 3.5); // Change the '8.0, 3.0, 10.0' to the coordinates of your gate when it's closed.
    gateopen = false; //This indicates the gate is closed again. Or at least, closing.
  }
}
Reply
#2

Which line?
Reply
#3

Quote:
Originally Posted by Dwane
Посмотреть сообщение
Which line?
Код:
MoveObject(gate, 2324.5637,2443.9558,5.6758); //Then open it! Change '32.0, 12.0, 10.0' to the coordinates of your opened gate.
Reply
#4

Change to
pawn Код:
MoveObject(gate, 2324.5637,2443.9558,5.6758, 3.5);
You missed a parameter (speed).
Reply
#5

Quote:
Originally Posted by Dwane
Посмотреть сообщение
Change to
pawn Код:
MoveObject(gate, 2324.5637,2443.9558,5.6758, 3.5);
You missed a parameter (speed).
ah! got it thanks +rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)