Errors!
#1

Код:
      if(PlayerInfo[playerid][pVip] == 1)
      COMMAND:s( playerid, params[ ] )
      if(cmdtext[2]==0){SendClientMessage(playerid,0xDEB8870AA, "* Naudojimas: /s [tekstas]"); return 1;}
      new zin[256],vardas[MAX_PLAYER_NAME];
      GetPlayerName(playerid,vardas,MAX_PLAYER_NAME);
      format(zin,sizeof(zin),"*Vip {FF0000}%s{DEB887}: %s",vardas,cmdtext[3]);
      SendClientMessageToAll(0xDEB887AA,zin);
  }
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 399) : error 010: invalid function or declaration
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 401) : error 017: undefined symbol "cmdtext"
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 401) : warning 215: expression has no effect
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 401) : error 001: expected token: ";", but found "]"
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 403) : error 021: symbol already defined: "GetPlayerName"
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 485) : warning 203: symbol is never used: "vardas"
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 485) : warning 203: symbol is never used: "zin"

If i remove this line:

Код:
if(cmdtext[2]==0){SendClientMessage(playerid,0xDEB8870AA, "* Naudojimas: /s [tekstas]"); return 1;}
errors:

C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 399) : error 010: invalid function or declaration
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 401) : error 003: declaration of a local variable must appear in a compound block
Reply
#2

UP..
Reply
#3

WTF are you doing paste some more lines before the command.
Reply
#4

Here what is wrong right, and i quote
Quote:

"EVERYTHING"

please read on how use zcmd,dcmd,ycmd properly before attempting any stunts everything about that is wrong
Reply
#5

I THINK this should work fine.

pawn Код:
if(PlayerInfo[playerid][pVip] == 1)
{
      COMMAND:s(playerid, params[])
      {
      if(cmdtext[2] == 0) SendClientMessage(playerid,0xDEB8870AA, "* Naudojimas: /s [tekstas]");

      new zin[256], vardas[MAX_PLAYER_NAME];
      GetPlayerName(playerid, vardas, MAX_PLAYER_NAME);
      format(zin, sizeof(zin), "*Vip {FF0000}%s{DEB887}: %s", vardas, cmdtext[3]);
      SendClientMessageToAll(0xDEB887AA, zin);
      return 1;
      }
}
Reply
#6

Quote:
Originally Posted by Huxley
Посмотреть сообщение
I THINK this should work fine.

pawn Код:
if(PlayerInfo[playerid][pVip] == 1)
{
      COMMAND:s(playerid, params[])
      {
      if(cmdtext[2] == 0) SendClientMessage(playerid,0xDEB8870AA, "* Naudojimas: /s [tekstas]");

      new zin[256], vardas[MAX_PLAYER_NAME];
      GetPlayerName(playerid, vardas, MAX_PLAYER_NAME);
      format(zin, sizeof(zin), "*Vip {FF0000}%s{DEB887}: %s", vardas, cmdtext[3]);
      SendClientMessageToAll(0xDEB887AA, zin);
      return 1;
      }
}
Ar you kidding me? Read ZCMD's thread. Command should not be inside any callback.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)