Some Errors
#1

Код:
if(strcmp(cmd, "/factionspawn", true) == 0)
   {
      if(IsPlayerConnected(playerid))
      {
         new x_nr[256];
         x_nr = strtok(cmdtext, idx);
         if(!strlen(x_nr)) {
             SendClientMessage(playerid, COLOR_WHITE, "Type: /factionspawn (primary ; secondary)");
            return 1;
       }
         if(SpawnChange[playerid])
         {
             if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
             {
                  if(strcmp(x_nr,"primary",true) == 0)
                  {
                        if(LcnSpawn[playerid] == 0)
                        {
                            LcnSpawn[playerid] = 1;
                            return 1;
                        }
                           else if(strcmp(x_nr,"secondary",true) == 0)
                        {
                             if(LcnSpawn[playerid] == 1)
                             {
                                  LcnSpawn[playerid] = 0;
                                  return 1;
                             }
                       }
                  }
             }
		 }
	 }
       return 1;
   }
Код:
C:\Documents and Settings\MARIUS\Desktop\Server\gamemodes\rp.pwn(5770) : warning 215: expression has no effect
C:\Documents and Settings\MARIUS\Desktop\Server\gamemodes\rp.pwn(29909) : error 028: invalid subscript (not an array or too many subscripts): "LcnSpawn"
C:\Documents and Settings\MARIUS\Desktop\Server\gamemodes\rp.pwn(29909) : warning 215: expression has no effect
C:\Documents and Settings\MARIUS\Desktop\Server\gamemodes\rp.pwn(29909) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\MARIUS\Desktop\Server\gamemodes\rp.pwn(29909) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MARIUS\Desktop\Server\gamemodes\rp.pwn(29909) : fatal error 107: too many error messages on one line

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


4 Errors.
Could you tell me what is wrong?
Thanks.
Reply
#2

how did you define "LcnSpawn"?

(it should be new LcnSpawn[MAX_PLAYERS]
Reply
#3

Quote:
Originally Posted by Sascha
Посмотреть сообщение
how did you define "LcnSpawn"?

(it should be new LcnSpawn[MAX_PLAYERS]
I added new LcnSpawn[MAX_PLAYERS] 0 errors , but in game the command doesn't works.

/imageshack/img839/8506/samp029qv.png
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)