[Help] Whats is wrong with the code please?
#1

Ok so trying to make a gate and i swear I've done everything right ? but clearly not?

These are on top of script
pawn Код:
new PDGate;

forward PDGateClose();
This is on "public OnGameModeInit()"
pawn Код:
PDGate = CreateObject(969,629.40325928,-583.38275146,15.62240791,0.00000000,0.00000000,270.00000000);
This is on Commands Obviously
pawn Код:
if (strcmp(cmdtext, "/PDGate", true)==0)
      {
      MoveObject(PDGate,629.40234375, -583.3818359375, 15.622407913208, 3.5);
      SetTimer("PDGateClose", 5000, 0);
      SendClientMessage(playerid, 0xFFFF00AA, "The Policegate Will Shut In 5 Seconds");
      return 1;
      }



    return 0;
}
This is at the bottom of script
pawn Код:
public PDGateClose()
{
      MoveObject (PDGate,629.40325927734, -583.38275146484, 15.622407913208, 2.5);
     
      return 1;
}

These Are the error's

pawn Код:
C:\Users\Tyler Burgess\Documents\SA Servers\Own coded\gamemodes\PoleRlay.pwn(85) : error 017: undefined symbol "PDGate"
C:\Users\Tyler Burgess\Documents\SA Servers\Own coded\gamemodes\PoleRlay.pwn(178) : error 017: undefined symbol "PDGate"
C:\Users\Tyler Burgess\Documents\SA Servers\Own coded\gamemodes\PoleRlay.pwn(324) : warning 235: public function lacks forward declaration (symbol "PDGateClose")
C:\Users\Tyler Burgess\Documents\SA Servers\Own coded\gamemodes\PoleRlay.pwn(326) : error 017: undefined symbol "PDGate"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Help would be much respected !!!







.
Reply
#2

pawn Код:
new PDGate;
forward PDGateClose();
// PUT BOTH ON SCRIPT TOP
pawn Код:
PDGate = CreateObject(969,629.40325928,-583.38275146,15.62240791,0.00000000,0.00000000,270.00000000);
// GAMEMODE INIT
pawn Код:
public PDGateClose()
{
      MoveObject (PDGate,629.40325927734, -583.38275146484, 15.622407913208, 2.5);
     
      return 1;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if (strcmp(cmdtext, "/PDGate", true)==0)
      {
      MoveObject(PDGate,629.40234375, -583.3818359375, 15.622407913208, 3.5);
      SetTimer("PDGateClose", 5000, false);
      SendClientMessage(playerid, 0xFFFF00AA, "The Policegate Will Shut In 5 Seconds");
      return 1;
      }



    return 0;
}
Reply
#3

sorry i dont understand? thats almost exactly what i put anyway? lol
Reply
#4

ohh i get it thanks !!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)