empty statement -
Dishz - 30.05.2016
O que estб errado?
PHP код:
if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 1 || (OutraV[playerid] == -1));
PHP код:
error 036: empty statement
Re: empty statement -
WLSF - 30.05.2016
vocк botou ponto e vнrgula ';' no if, isso й uma estrutura de controle, nгo uma aзгo que vai ser executada...
Re: empty statement -
F1N4L - 30.05.2016
Colocou um ';' em uma condicional!
Re: empty statement -
Dishz - 30.05.2016
Quando retiro o bonito do ';'
PHP код:
error 003: declaration of a local variable must appear in a compound block
error 017: undefined symbol "tmp"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line
Re: empty statement -
F1N4L - 30.05.2016
Код:
if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 1 || (OutraV[playerid] == -1))
{
// cуdigo
}
Variavel 'tmp' nгo existe
Re: empty statement -
moura98 - 30.05.2016
Verdade o ponto e virgula nao existe em condicional
Re: empty statement -
Dishz - 30.05.2016
@F1N4L, jб tentei assim tambйm das erros tambйm!
PHP код:
error 003: declaration of a local variable must appear in a compound block
error 017: undefined symbol "tmp"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
@Edit
PHP код:
forward GetPlayerAdminLevel(playerid);
public GetPlayerAdminLevel(playerid) return Admin[playerid][Level];
Re: empty statement -
F1N4L - 30.05.2016
Posta o cуdigo completo
Re: empty statement -
Dishz - 30.05.2016
@F1N4L
PHP код:
CMD:m(playerid, params[])
{
if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 1 || (OutraV[playerid] == -1))
new tmp[256], Index;
tmp = strtok(params,Index);
new string[128]; GetPlayerName(playerid, string, sizeof(string));
if(!strlen(params)) return SendClientMessage(playerid, -1, "{6EF83C}Use:{FFFFFF} /M [Texto]");
format(string, sizeof(string), " ~ Chat: %s: %s", PlayerName(playerid), params[0]);
for(new I = 0; I < MAX_PLAYERS; I ++)
{
if(IsPlayerConnected(I))
{
if(!IsPlayerAdmin(I) && OutraV[I] == 10) SendClientMessage(I, -1, string);
if(IsPlayerAdmin(I)) SendClientMessage(I, -1, string);
}
}
return 1;
}
Re: empty statement -
zSuYaNw - 30.05.2016
tente agora:
PHP код:
CMD:m(playerid, params[])
{
if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 1 || (OutraV[playerid] == -1))
return SendClientMessage(playerid, -1, "Vocк nгo tem nivel administrativo");
new tmp[256], Index;
tmp = strtok(params,Index);
new string[128]; GetPlayerName(playerid, string, sizeof(string));
if(!strlen(params)) return SendClientMessage(playerid, -1, "{6EF83C}Use:{FFFFFF} /M [Texto]");
format(string, sizeof(string), " ~ Chat: %s: %s", PlayerName(playerid), params[0]);
for(new I = 0; I < MAX_PLAYERS; I ++)
{
if(IsPlayerConnected(I))
{
if(!IsPlayerAdmin(I) && OutraV[I] == 10) SendClientMessage(I, -1, string);
if(IsPlayerAdmin(I)) SendClientMessage(I, -1, string);
}
}
return 1;
}