[SOLVED] 26 errors - Open/Close gates -
cozza123456 - 18.08.2009
I am trying to make my gates open/close. i have done it in the same way as i did my other gates yet i get 26 errors ----
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(299) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(302) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(311) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(314) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(320) : warning 217: loose indentation
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(323) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(326) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(333) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(336) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(342) : warning 217: loose indentation
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(354) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(373) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(38

: error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(404) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(41

: error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(432) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(447) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(453) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(473) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(475) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(490) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(492) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(49

: error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(516) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(523) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(531) : error 004: function "CountDown" is not implemented
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(532) : error 079: inconsistent return types (array & non-array)
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(535) : error 079: inconsistent return types (array & non-array)
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
How do i fix this?
Thankyou , cozza
Re: 26 errors - Open/Close gates -
Lewwy - 18.08.2009
Can you show us the code?
Re: 26 errors - Open/Close gates -
cozza123456 - 18.08.2009
sure can ------
//------------------------------------------------------------------------------
if(strcmp(cmdtext,"/secret", true) == 0) //CLOSEGATE
{
{
if(PlayerToPoint(15.0, playerid,-2468.3889,1547.0945,23.8359))
{
MoveObject(cozgate, -2468.352051, 1547.224243, 21.280209, 2.0);
return 1;
}
if(strcmp(cmdtext,"/secret1", true) == 0) //OPENGATE
{
{
if(PlayerToPoint(15.0, playerid,-2468.3889,1547.0945,23.8359))
{
MoveObject(cozgate, -2468.371338, 1547.240723, 24.030167, 2.0);
return 1;
}
}
}
Re: 26 errors - Open/Close gates -
Lewwy - 18.08.2009
pawn Код:
if(strcmp(cmdtext,"/secret", true) == 0) //CLOSEGATE
{
if(PlayerToPoint(15.0, playerid, -2468.3889, 1547.0945, 23.8359))
{
MoveObject(cozgate, -2468.352051, 1547.224243, 21.280209, 2.0);
}
return 1;
}
if(strcmp(cmdtext,"/secret1", true) == 0) //OPENGATE
{
if(PlayerToPoint(15.0, playerid, -2468.3889, 1547.0945, 23.8359))
{
MoveObject(cozgate, -2468.371338, 1547.240723, 24.030167, 2.0);
}
return 1;
}
Try that.
Re: 26 errors - Open/Close gates -
cozza123456 - 18.08.2009
can u make it close without command? just open with command? say close after 10 seconds?
and tyvm brill.
Re: 26 errors - Open/Close gates -
Lewwy - 18.08.2009
pawn Код:
if(strcmp(cmdtext,"/secret1", true) == 0) //OPENGATE
{
if(PlayerToPoint(15.0, playerid, -2468.3889, 1547.0945, 23.8359))
{
MoveObject(cozgate, -2468.371338, 1547.240723, 24.030167, 2.0);
SendClientMessage(playerid, 0x33FF33AA, "SUCCESS: Gate has been opened, automatically closing in 10 seconds");
SetTimerEx("CloseGate", 10000, false, "i", playerid);
}
return 1;
}
forward CloseGate(playerid)
public CloseGate(playerid)
{
MoveObject(cozgate, -2468.352051, 1547.224243, 21.280209, 2.0);
return 1;
}
That should work.
Re: [SOLVED] 26 errors - Open/Close gates -
cozza123456 - 18.08.2009
doesn't seem to?
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(330) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(330) : error 017: undefined symbol "CloseGate"
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(331) : error 001: expected token: ";", but found "public"
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(331) : warning 217: loose indentation
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(331) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(331) : error 017: undefined symbol "CloseGate"
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(331) : fatal error 107: too many error messages on one line
Re: [SOLVED] 26 errors - Open/Close gates -
Lewwy - 18.08.2009
Crap sorry;
pawn Код:
forward CloseGate(playerid);
public CloseGate(playerid)
{
MoveObject(cozgate, -2468.352051, 1547.224243, 21.280209, 2.0);
return 1;
}
Re: [SOLVED] 26 errors - Open/Close gates -
cozza123456 - 18.08.2009
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(330) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(330) : error 017: undefined symbol "CloseGate"
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(331) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(331) : error 017: undefined symbol "CloseGate"
C:\Users\Administrator\Desktop\SAMPSERVER (1)\gamemodes\CJFreeRoam212121.pwn(337) : warning 225: unreachable code
EDIT1:
//------------------------------------------------------------------------------
if(strcmp(cmdtext,"/secret1", true) == 0) //OPENGATE
{
if(PlayerToPoint(15.0, playerid, -2468.3889, 1547.0945, 23.8359))
{
MoveObject(cozgate, -2468.371338, 1547.240723, 24.030167, 2.0);
SendClientMessage(playerid, 0x33FF33AA, "SUCCESS: Gate has been opened, automatically closing in 10 seconds");
SetTimerEx("CloseGate", 10000, false, "i", playerid);
}
return 1;
}
forward CloseGate(playerid);
public CloseGate(playerid)
{
MoveObject(cozgate, -2468.352051, 1547.224243, 21.280209, 2.0);
return 1;
}
?? please help
Re: [SOLVED] 26 errors - Open/Close gates -
Lewwy - 18.08.2009
Can you show me what you have copied? (That part of the script)
EDIT: It works for me, try play about with it a bit.
Re: [SOLVED] 26 errors - Open/Close gates -
cozza123456 - 18.08.2009
im a new scripter, maybe not put header at top of GM? i dont know lol only been scripting 3 weeks

Maybe you could suggest stuff to mess with?