[Ajuda] Alguйm me ajuda com esses erros ? -
._DubSteP[SK] - 18.10.2011
Alguйm por favor, poderia me ajudar com estes erros ? estou ficando louco jб husahusauh.
Код:
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5192) : error 001: expected token: "-identifier-", but found "="
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5193) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5193) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5193) : warning 215: expression has no effect
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5193) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5193) : fatal error 107: too many error messages on one line
linhas dos erros.
pawn Код:
new quantidade = strval(inputtext);
if(quantidade < 1 || quantidade > 10000)
Funзгo Inteira dos Erros.
pawn Код:
if(dialogid == 2583)
{
if(!response) { return ShowPlayerDialog(playerid, 2582, DIALOG_STYLE_LIST, "Mafia Menu", "Equipar\nPegar Materiais\nEsconder Materiais", "Confirma", "Cancela"); }
else if(!IsNumero(inputtext))
{
ShowPlayerDialog(playerid,2583,DIALOG_STYLE_INPUT,"Pegar Safe Materiais","Digite a quantia de safe materiais que deseja pegar","Pegar","Voltar");
MSGPLAYER(playerid,COLOR_GREY,"Porfavor,use nъmeros !");
return 1;
}
new quantidade = strval(inputtext);
if(quantidade < 1 || quantidade > 10000)
{
MSGPLAYER(playerid, COLOR_GRAD2, "nгo pode pegar menos de 1 e nem mais de 10000");
return 1;
}
if(PlayerInfo[playerid][psMats] >= quantidade)
{
PlayerInfo[playerid][pMats] = PlayerInfo[playerid][pMats]+quantidade;
PlayerInfo[playerid][psMats] = PlayerInfo[playerid][psMats]-quantidade;
format(gstring, sizeof(gstring), "* Vocк pegou %d materiais no esconderijo!",quantidade);
MSGPLAYER(playerid, COLOR_LIGHTBLUE, gstring);
return 1;
}
else
{
MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo tem tudo isso!");
return 1;
}
}
Dou REP+ Em Qualquer 1 que me ajudar ou pelomenos tentar.
Re: [Ajuda] Alguйm me ajuda com esses erros ? -
Josma_cmd - 18.10.2011
Tente:
pawn Код:
if(dialogid == 2583)
{
if(!response) { return ShowPlayerDialog(playerid, 2582, DIALOG_STYLE_LIST, "Mafia Menu", "Equipar\nPegar Materiais\nEsconder Materiais", "Confirma", "Cancela"); }
else if(response)
{
if(!IsNumero(inputtext))
{
ShowPlayerDialog(playerid,2583,DIALOG_STYLE_INPUT,"Pegar Safe Materiais","Digite a quantia de safe materiais que deseja pegar","Pegar","Voltar");
MSGPLAYER(playerid,COLOR_GREY,"Porfavor,use nъmeros !");
return 1;
}
new quantidade = strval(inputtext);
if(quantidade < 1 || quantidade > 10000) return MSGPLAYER(playerid, COLOR_GRAD2, "nгo pode pegar menos de 1 e nem mais de 10000");
if(PlayerInfo[playerid][psMats] >= quantidade)
{
PlayerInfo[playerid][pMats] = PlayerInfo[playerid][pMats]+quantidade;
PlayerInfo[playerid][psMats] = PlayerInfo[playerid][psMats]-quantidade;
format(gstring, sizeof(gstring), "* Vocк pegou %d materiais no esconderijo!",quantidade);
MSGPLAYER(playerid, COLOR_LIGHTBLUE, gstring);
return 1;
}
if(PlayerInfo[playerid][psMats] < quantidade)
{
MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo tem tudo isso!");
return 1;
}
}
}
Re: [Ajuda] Alguйm me ajuda com esses erros ? -
Sergiinhonike - 18.10.2011
PHP код:
if(dialogid == 2583)
{
if(!response) return ShowPlayerDialog(playerid, 2582, DIALOG_STYLE_LIST, "Mafia Menu", "Equipar\nPegar Materiais\nEsconder Materiais", "Confirma", "Cancela");
if(!IsNumero(inputtext))
{
ShowPlayerDialog(playerid,2583,DIALOG_STYLE_INPUT,"Pegar Safe Materiais","Digite a quantia de safe materiais que deseja pegar","Pegar","Voltar");
MSGPLAYER(playerid,COLOR_GREY,"Porfavor,use nъmeros !");
return 1;
}
new quantidade = strval(inputtext);
if(quantidade < 1 || quantidade > 10000) return MSGPLAYER(playerid, COLOR_GRAD2, "nгo pode pegar menos de 1 e nem mais de 10000");
if(PlayerInfo[playerid][psMats] >= quantidade)
{
PlayerInfo[playerid][pMats] = PlayerInfo[playerid][pMats]+quantidade;
PlayerInfo[playerid][psMats] = PlayerInfo[playerid][psMats]-quantidade;
format(gstring, sizeof(gstring), "* Vocк pegou %d materiais no esconderijo!",quantidade);
MSGPLAYER(playerid, COLOR_LIGHTBLUE, gstring);
return 1;
}
return MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo tem tudo isso!");
}
OBS: Nгo testei. pos estou com o pc formatado e fis no bloco de notas entao pode ter alguns avisos de indentaзгo..
Re: [Ajuda] Alguйm me ajuda com esses erros ? -
._DubSteP[SK] - 18.10.2011
Ambos nгo adiantou :/
Код:
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5183) : warning 217: loose indentation
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5194) : error 001: expected token: "-identifier-", but found "="
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5195) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5195) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5195) : warning 215: expression has no effect
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5195) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Administrador\Desktop\GM BSG\gamemodes\PFRP.pwn(5195) : fatal error 107: too many error messages on one line
Mesmos erros Linhas diferentes :/
Re: [Ajuda] Alguйm me ajuda com esses erros ? -
Sergiinhonike - 18.10.2011
Verifica os numeros exatos das linha por favor!
e me passa se der algum erro!
PHP код:
if (dialogid == 2583)
{
if (!response) return ShowPlayerDialog(playerid, 2582, DIALOG_STYLE_LIST, "Mafia Menu", "Equipar\nPegar Materiais\nEsconder Materiais", "Confirma", "Cancela");
if (!IsNumero(inputtext))
{
ShowPlayerDialog(playerid,2583,DIALOG_STYLE_INPUT,"Pegar Safe Materiais","Digite a quantia de safe materiais que deseja pegar","Pegar","Voltar");
MSGPLAYER(playerid,COLOR_GREY,"Porfavor,use nъmeros !");
return 1;
}
new quantidade;
quantidade = strval(inputtext);
if (quantidade < 1 || quantidade > 10000) return MSGPLAYER(playerid, COLOR_GRAD2, "nгo pode pegar menos de 1 e nem mais de 10000");
if (PlayerInfo[playerid][psMats] >= quantidade)
{
PlayerInfo[playerid][psMats] -= quantidade;
PlayerInfo[playerid][pMats] += quantidade;
format(gstring, sizeof(gstring), "* Vocк pegou %d materiais no esconderijo!",quantidade);
MSGPLAYER(playerid, COLOR_LIGHTBLUE, gstring);
return 1;
}
return MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo tem tudo isso!");
}
@OFF
Sabia que ia dar isso (loose indentation), no meu codigo, no outro post, claro!!
Re: [Ajuda] Alguйm me ajuda com esses erros ? -
._DubSteP[SK] - 18.10.2011
mesma coisa, loose identation :/, consegui resolver estes erros, agora apareceram estes
Код:
C:\Documents and Settings\Administrador\Desktop\PFRP.pwn(28308) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador\Desktop\PFRP.pwn(28308) : warning 215: expression has no effect
a linha й esta
pawn Код:
PlayerInfo[para1][pSocio] = 1;
e a funзгo й esta
pawn Код:
if(strcmp(cmd, "/darsocio", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
MSGPLAYER(playerid, COLOR_GRAD2, "USE: /darsocio [id]");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pAdmin] >= 1338)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pSocio] = 1;
format(string, sizeof(string), " Vocк ganhou VIP socio do admin %s", sendername);
MSGPLAYER(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк deu VIP socio para %s.", giveplayer);
MSGPLAYER(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
MSGPLAYER(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
}
}
return 1;
}
Re: [Ajuda] Alguйm me ajuda com esses erros ? -
Sergiinhonike - 18.10.2011
PHP код:
if(strcmp(cmd, "/darsocio", true) == 0)
{
new tmp[128], para1;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return MSGPLAYER(playerid, COLOR_GRAD2, "USE: /darsocio [id]");
para1 = strval(tmp);
if(IsPlayerConnected(para1) && (PlayerInfo[playerid][pAdmin] >= 1338))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pSocio] = 1;
format(string, sizeof(string), " Vocк ganhou VIP socio do admin %s", sendername);
MSGPLAYER(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк deu VIP socio para %s.", giveplayer);
MSGPLAYER(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
return MSGPLAYER(playerid, COLOR_GRAD1, " Este jogador nгo existe!");
}
return MSGPLAYER(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
}
^^ fui, boa noite e boa sorte.
Se te ajudei, +reputation.