SA-MP Forums Archive
[Help] Whats is wrong with the code please? - 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: [Help] Whats is wrong with the code please? (/showthread.php?tid=239413)



[Help] Whats is wrong with the code please? - BurgessGaming - 13.03.2011

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 !!!







.


Re: [Help] Whats is wrong with the code please? - blackwave - 13.03.2011

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;
}



Re: [Help] Whats is wrong with the code please? - BurgessGaming - 13.03.2011

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


Re: [Help] Whats is wrong with the code please? - BurgessGaming - 13.03.2011

ohh i get it thanks !!!!!