02.10.2011, 21:17
Bom, um dia o Pharrel estava me ajudando a converter uns comandos meus para ZCMD, ele me ajudou muito, mas mesmo depois disso estб dando uns erros. Serб que alguйm pode me ajudar?
Os erros estб em algum lugar desses dois comandos:
Obrigado.
pawn Код:
C:\Users\usuario\Desktop\STDM\gamemodes\STDM.pwn(2122) : warning 217: loose indentation
C:\Users\usuario\Desktop\STDM\gamemodes\STDM.pwn(2122) : error 029: invalid expression, assumed zero
C:\Users\usuario\Desktop\STDM\gamemodes\STDM.pwn(2122) : warning 215: expression has no effect
C:\Users\usuario\Desktop\STDM\gamemodes\STDM.pwn(2122) : error 001: expected token: ";", but found "return"
C:\Users\usuario\Desktop\STDM\gamemodes\STDM.pwn(2123) : warning 225: unreachable code
C:\Users\usuario\Desktop\STDM\gamemodes\STDM.pwn(2126) : warning 217: loose indentation
C:\Users\usuario\Desktop\STDM\gamemodes\STDM.pwn(2126) : error 029: invalid expression, assumed zero
C:\Users\usuario\Desktop\STDM\gamemodes\STDM.pwn(2126) : error 017: undefined symbol "cmd_setscore"
C:\Users\usuario\Desktop\STDM\gamemodes\STDM.pwn(2126) : error 029: invalid expression, assumed zero
C:\Users\usuario\Desktop\STDM\gamemodes\STDM.pwn(2126) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
pawn Код:
CMD:vida(playerid, params[])
{
new string [128];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo estб logado na RCON.");
if(sscanf(params,"ud",id, valor[0]))return SendClientMessage(playerid, COLOR_BLACK_GRAY, "[ERRO DE SINTAXE] /vida [id] [vida]");//
if(IsPlayerConnected(id))
{
for(new allplayers = 0; allplayers < GetMaxPlayers(); allplayers++)
{
format(string, sizeof(string), "O Admnistrador %s setou a vida de %s para %d.", pNome(playerid),pNome(allplayers),valor[0]);
SendClientMessageToAll(COLOR_WHITE, string);
SetPlayerHealth(id,valor[0]);
return 1;
}
else return SendClientMessage(playerid, COLOR_BLACK_GRAY, "Jogador nгo conectado.");
return 1;
}
CMD:setscore(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo estб logado na RCON.");
if(sscanf(params,"ud",id, valor[0]))return SendClientMessage(playerid, COLOR_BLACK_GRAY, "[ERRO DE SINTAXE] /setscore [id] [score]");
if(IsPlayerConnected(id))
{
format(string, sizeof(string), "O Admnistrador %s setou o score de %s para %d.", pNome(playerid),pNome(i),valor[0]);
SendClientMessageToAll(COLOR_WHITE, string);
SetPlayerScore(id,valor[0]);
return 1;
}
else return SendClientMessage(playerid, COLOR_BLACK_GRAY, "Jogador nгo conectado.");
}