CMD:r(playerid, params[])
{
new Classes[120];
new string[128];
{
if(gClasse[playerid] == SOLDADO) Classes = "assalto";
if(gClasse[playerid] == SNIPER) Classes = "sniper";
if(gClasse[playerid] == ENGENHEIRO) Classes = "engenheiro";
if(gClasse[playerid] == PILOTO) Classes = "piloto";
if(gClasse[playerid] == MEDICO) Classes = "suporte";
}
String("[RADIO][%s][%d]%s: %s", Classes[playerid],playerid,nome(playerid),params);
foreach(Player,i)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid))
{
SendClientMessage(i,cor_verdeclaro,string);
}
}
}
return 1;
}
C:\Users\Daniel\Desktop\Battlefield Veterans\gamemodes\TDM.pwn(6416) : error 017: undefined symbol "String"
C:\Users\Daniel\Desktop\Battlefield Veterans\gamemodes\TDM.pwn(6419) : warning 219: local variable "i" shadows a variable at a preceding level
CMD:r(playerid, params[])
{
new Classes[120];
new String[128];
{
if(gClasse[playerid] == SOLDADO) Classes = "assalto";
if(gClasse[playerid] == SNIPER) Classes = "sniper";
if(gClasse[playerid] == ENGENHEIRO) Classes = "engenheiro";
if(gClasse[playerid] == PILOTO) Classes = "piloto";
if(gClasse[playerid] == MEDICO) Classes = "suporte";
}
String("[RADIO][%s][%d]%s: %s", Classes[playerid],playerid,nome(playerid),params);
foreach(Player,i)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerTeam(playerid) == GetPlayerTeam(playerid))
{
SendClientMessage(i,cor_verdeclaro,string);
}
}
}
return 1;
}
C:\Users\Daniel\Desktop\Battlefield Veterans\gamemodes\TDM.pwn(6416) : error 012: invalid function call, not a valid address
C:\Users\Daniel\Desktop\Battlefield Veterans\gamemodes\TDM.pwn(6416) : warning 215: expression has no effect
C:\Users\Daniel\Desktop\Battlefield Veterans\gamemodes\TDM.pwn(6416) : warning 215: expression has no effect
C:\Users\Daniel\Desktop\Battlefield Veterans\gamemodes\TDM.pwn(6416) : warning 215: expression has no effect
C:\Users\Daniel\Desktop\Battlefield Veterans\gamemodes\TDM.pwn(6416) : warning 215: expression has no effect
C:\Users\Daniel\Desktop\Battlefield Veterans\gamemodes\TDM.pwn(6416) : error 001: expected token: ";", but found ")"
C:\Users\Daniel\Desktop\Battlefield Veterans\gamemodes\TDM.pwn(6416) : error 029: invalid expression, assumed zero
C:\Users\Daniel\Desktop\Battlefield Veterans\gamemodes\TDM.pwn(6416) : fatal error 107: too many error messages on one line
String("[RADIO][%s][%d]%s: %s", Classes[playerid],playerid,nome(playerid),params);
CMD:r(playerid, params[])
{
new Classes[24], string[128];
if(gClasse[playerid] == SOLDADO) Classes = "assalto";
if(gClasse[playerid] == SNIPER) Classes = "sniper";
if(gClasse[playerid] == ENGENHEIRO) Classes = "engenheiro";
if(gClasse[playerid] == PILOTO) Classes = "piloto";
if(gClasse[playerid] == MEDICO) Classes = "suporte";
format(string, sizeof(string), "[RADIO][%s][%d]%s: %s", Classes, playerid, nome(playerid), params);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid))
{
SendClientMessage(i, 0x00FF80AA, string);
}
}
return 1;
}
Eu ia dizer, faltou formatar a string e o outro nгo encontrei, mais mesmo assim seria seu erro.
Abraзos. |