Errors! -
Louris - 18.11.2012
Код:
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
Re: Errors! -
Louris - 19.11.2012
UP..
Re: Errors! -
Faisal_khan - 19.11.2012
WTF are you doing paste some more lines before the command.
Re: Errors! -
Glad2BeHere - 19.11.2012
Here what is wrong right, and i quote
please read on how use zcmd,dcmd,ycmd properly before attempting any stunts everything about that is wrong
Re: Errors! -
Huxley - 19.11.2012
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;
}
}
Re: Errors! -
Konstantinos - 19.11.2012
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.