CMD Help
#1

Код:
CMD:sasgate(playerid, params[]) {
	if(playerVariables[playerid][pGroup] == 5) {
	MoveObject(objectname, -411.60000610352, 1362, 14.800000190735, 1);
	{
	else if [pGroup] >= 5) retrun SendClientMessage(playerid, COLOR_RED, "You are not apart of the S.A.S!");
	}
	return 1;
}
I know I gone wrong somewhere can someone help me?
Reply
#2

else if [pGroup] >= 5) retrun] SendClientMessage(playerid, COLOR_RED, "You are not apart of the S.A.S!");
Reply
#3

Same Errors:
Код:
C:\Users\Jordan\Desktop\Windows-Server\gamemodes\vx-rp.pwn(5660) : error 017: undefined symbol "cmd_mobile"
C:\Users\Jordan\Desktop\Windows-Server\gamemodes\vx-rp.pwn(6614) : error 017: undefined symbol "showHelp"
C:\Users\Jordan\Desktop\Windows-Server\gamemodes\vx-rp.pwn(11463) : error 029: invalid expression, assumed zero
C:\Users\Jordan\Desktop\Windows-Server\gamemodes\vx-rp.pwn(11463) : warning 215: expression has no effect
C:\Users\Jordan\Desktop\Windows-Server\gamemodes\vx-rp.pwn(11463) : error 001: expected token: ";", but found "if"
C:\Users\Jordan\Desktop\Windows-Server\gamemodes\vx-rp.pwn(11463) : error 029: invalid expression, assumed zero
C:\Users\Jordan\Desktop\Windows-Server\gamemodes\vx-rp.pwn(11463) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
EDIT:
Also there is something wrong with that CMD I know it lol.
Reply
#4

I don't think these errors have anything to do with your sasgate command.
Reply
#5

"else if [pGroup] >= 5) retrun"

You fixed that retrun?Must be return.
Reply
#6

Yes I fixed it.
@Sasoft, If I remove that Command the errors go, so it must be. xDD

Also the command dont look right.
Reply
#7

The code don't work because you have opened 3 of this brackets: { and closed only one.

pawn Код:
CMD:sasgate(playerid, params[])
        {
    if(playerVariables[playerid][pGroup] == 5)
       {
    MoveObject(objectname, -411.60000610352, 1362, 14.800000190735, 1);
    {
    else if [pGroup] >= 5) retrun SendClientMessage(playerid, COLOR_RED, "You are not apart of the S.A.S!");
    }
    }
   return 1;
}
Reply
#8

Try using ZCMD and do it this way.

Код:
command(sasgate, playerid, params[])
{
     if(PlayerVariables[playerid][pGroup] == 5)
     {
          MoveObjectobjectname, -411.60000610352, 1362, 14.800000190735, 1);
     }
     else if [pGroup] < 5) || [pGroup] > 5)
     {
          SendClientMessage(playerid, COLOR_RED, "You are not a part of the S.A.S!");
     }
     return 1;
}
Reply
#9

of you could just do it this way .. You dont really need to do the "else if" because if the person is not in group 5 it will say the SendClientMessage. If you need any help you can PM me, i am a failrly good scripter and might be able to help you out with anything you might need.

Код:
command(sasgate, playerid, params[])
{
     if(PlayerVariables[playerid][pGroup] == 5)
     {
          MoveObjectobjectname, -411.60000610352, 1362, 14.800000190735, 1);
     }
     else
     {
          SendClientMessage(playerid, COLOR_RED, "You are not a part of the S.A.S!");
     }
     return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)