Whats wrong with this script? -
patfay - 29.01.2011
Okay, I created a gate command, here it is
Top line is line 11656
Bottom line is 11666
Код:
if (strcmp(cmdtext, "/agateo", true)==0)
{
if(AccountInfo[playerid][aLevel] <= 0) SendClientMessage(playerid, COLOR_RED, "You need to be a Helper to use the gate command!");
{
MoveObject(agate,-1470.45617676,2611.21215820,50);
SendClientMessage(playerid, COLOR_YELLOW, "You open the admin gates!");
}
if (strcmp(cmdtext, "/agatec", true)==0)
{
if(AccountInfo[playerid][aLevel] <= 0) SendClientMessage(playerid, COLOR_RED, "You need to be a Helper to use the gate command!");
{
MoveObject(agate,-1470.45617676,2611.21215820,59.36460876);
SendClientMessage(playerid, COLOR_YELLOW, "You close the admin gates!");
}
but when I compile it I get
Код:
C:\Users\JoshLovely\Desktop\CNR-H.pwn(1634) : error 029: invalid expression, assumed zero
C:\Users\JoshLovely\Desktop\CNR-H.pwn(11656) : error 010: invalid function or declaration
C:\Users\JoshLovely\Desktop\CNR-H.pwn(11658) : error 010: invalid function or declaration
C:\Users\JoshLovely\Desktop\CNR-H.pwn(11663) : error 010: invalid function or declaration
C:\Users\JoshLovely\Desktop\CNR-H.pwn(11665) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
anyone know why?
Re: Whats wrong with this script? -
Conroy - 29.01.2011
Indentation helps.
So does knowing your functions
MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed)
You missed out the speed.
-Conroy
Re: Whats wrong with this script? -
bartje01 - 29.01.2011
errro line?
Re: Whats wrong with this script? -
bartje01 - 29.01.2011
errro line?
EDIT:
Wow shit. Dubble posted. SOrry
Re: Whats wrong with this script? -
patfay - 29.01.2011
They are there... I didnt list all the lines.. but you can just count down.. I listed the top and the bottom lines
Re: Whats wrong with this script? -
bartje01 - 29.01.2011
can I see the command above "/agateo" ?
Re: Whats wrong with this script? -
SchurmanCQC - 29.01.2011
pawn Код:
if (strcmp(cmdtext, "/agateo", true)== 0)
{
if(AccountInfo[playerid][aLevel] < 0) SendClientMessage(playerid, COLOR_RED, "You need to be a Helper to use the gate command!");
{
MoveObject(agate,-1470.45617676,2611.21215820,50);
SendClientMessage(playerid, COLOR_YELLOW, "You open the admin gates!");
{
if (strcmp(cmdtext, "/agatec", true)== 0) {
if(AccountInfo[playerid][aLevel] < 0) SendClientMessage(playerid, COLOR_RED, "You need to be a Helper to use the gate command!");
{
MoveObject(agate,-1470.45617676,2611.21215820,59.36460876);
SendClientMessage(playerid, COLOR_YELLOW, "You close the admin gates!");
}
Try that.
Re: Whats wrong with this script? -
patfay - 30.01.2011
Alright, I got it to work with this
Код:
}
if(strcmp(cmdtext, "/agateo", true)==0)
{
if(AccountInfo[playerid][aLevel] <= 0) SendClientMessage(playerid, COLOR_RED, "You need to be a Helper to use car command!");
SendClientMessage(playerid, COLOR_RED, "You have opened the staff gate!");
MoveObject(agate,-1472,2660.61840820,56.58593750, 3);
return 1;
}
if(strcmp(cmdtext, "/agatec", true)==0)
{
if(AccountInfo[playerid][aLevel] <= 0) SendClientMessage(playerid, COLOR_RED, "You need to be a Helper to use car command!");
SendClientMessage(playerid, COLOR_RED, "You have closed the staff gate!");
MoveObject(agate, -1481.26208496,2660.61840820,56.58593750, 3);
return 1;
}
But I would like to do two things,
1.) Make it so you can only open/close it if you are near it
2.) Make it so only rank 1+ admin or higher can open it ([aLevel])