[Ajuda] Erros comandos
#1

Код:
sss/core/player/commands.pwn(264) : error 001: expected token: ";", but found "if"
sss/core/player/commands.pwn(264) : error 028: invalid subscript (not an array or too many subscripts): "Player"
sss/core/player/commands.pwn(264) : warning 215: expression has no effect
sss/core/player/commands.pwn(264) : error 001: expected token: ";", but found "]"
sss/core/player/commands.pwn(264) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Codigo

Код:
CMD:equiparvip(playerid, params[])
{
    new backpackitem,
        containerid,
        tmpitem;
	new Player
    if(Player[playerid][Vip] == 1)
    {
        backpackitem = CreateItem(item_Backpack);//Mochila Media
        containerid = GetItemExtraData(backpackitem);

        GivePlayerBag(playerid, backpackitem);

        tmpitem = CreateItem(item_Wrench);//Chave de Roda
        AddItemToContainer(containerid, tmpitem);
        tmpitem = CreateItem(item_Screwdriver);//Chave de Fenda
        AddItemToContainer(containerid, tmpitem);
        tmpitem = CreateItem(item_Hammer);//Martelo
        AddItemToContainer(containerid, tmpitem);
        tmpitem = CreateItem(item_DoctorBag);//Mala de Doutor
        AddItemToContainer(containerid, tmpitem);
        SendClientMessage(playerid, AZUL_CLARO, "Vocк pegou seus equipamentos VIP!");
        return 0;
     }
     else if(Player[playerid][Vip] == 2)
     {
        backpackitem = CreateItem(item_Backpack);//Mochila Media
        containerid = GetItemExtraData(backpackitem);

        GivePlayerBag(playerid, backpackitem);

        tmpitem = CreateItem(item_Wrench);//Chave de Roda
        AddItemToContainer(containerid, tmpitem);
        tmpitem = CreateItem(item_Screwdriver);//Chave de Fenda
        AddItemToContainer(containerid, tmpitem);
        tmpitem = CreateItem(item_Hammer);//Martelo
        AddItemToContainer(containerid, tmpitem);
        tmpitem = CreateItem(item_DoctorBag);//Mala de Doutor
        AddItemToContainer(containerid, tmpitem);
        tmpitem = CreateItem(item_DoctorBag);//Mala de Doutor
        AddItemToContainer(containerid, tmpitem)
        SendClientMessage(playerid, AZUL_CLARO, "Vocк pegou seus equipamentos VIP 2!");
        return 0;
    }
    else
        SendClientMessage(playerid, Branco, "Vocк nгo й Vip ou nгo tem level suficiente!");
    return 1;
}
Linha 264
Код:
 if(Player[playerid][Vip] == 1)
Reply
#2

PHP код:

CMD
:equiparvip(playeridparams[])
{
    new 
backpackitem,containerid,tmpitem,Player;
    if(
Player[playerid][Vip] == 1)
    {
        
backpackitem CreateItem(item_Backpack);//Mochila Media
        
containerid GetItemExtraData(backpackitem);

        
GivePlayerBag(playeridbackpackitem);

        
tmpitem CreateItem(item_Wrench);//Chave de Roda
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Screwdriver);//Chave de Fenda
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Hammer);//Martelo
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_DoctorBag);//Mala de Doutor
        
AddItemToContainer(containeridtmpitem);
        
SendClientMessage(playeridAZUL_CLARO"Vocк pegou seus equipamentos VIP!");
        return 
0;
     }
     else if(
Player[playerid][Vip] == 2)
     {
        
backpackitem CreateItem(item_Backpack);//Mochila Media
        
containerid GetItemExtraData(backpackitem);

        
GivePlayerBag(playeridbackpackitem);

        
tmpitem CreateItem(item_Wrench);//Chave de Roda
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Screwdriver);//Chave de Fenda
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Hammer);//Martelo
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_DoctorBag);//Mala de Doutor
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_DoctorBag);//Mala de Doutor
        
AddItemToContainer(containeridtmpitem)
        
SendClientMessage(playeridAZUL_CLARO"Vocк pegou seus equipamentos VIP 2!");
        return 
0;
    }
    else  
SendClientMessage(playeridBranco"Vocк nгo й Vip ou nгo tem level suficiente!");
    return 
1;

Reply
#3

Quote:
Originally Posted by RazorGuigo
Посмотреть сообщение
PHP код:

CMD
:equiparvip(playeridparams[])
{
    new 
backpackitem,containerid,tmpitem,Player;
    if(
Player[playerid][Vip] == 1)
    {
        
backpackitem CreateItem(item_Backpack);//Mochila Media
        
containerid GetItemExtraData(backpackitem);
        
GivePlayerBag(playeridbackpackitem);
        
tmpitem CreateItem(item_Wrench);//Chave de Roda
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Screwdriver);//Chave de Fenda
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Hammer);//Martelo
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_DoctorBag);//Mala de Doutor
        
AddItemToContainer(containeridtmpitem);
        
SendClientMessage(playeridAZUL_CLARO"Vocк pegou seus equipamentos VIP!");
        return 
0;
     }
     else if(
Player[playerid][Vip] == 2)
     {
        
backpackitem CreateItem(item_Backpack);//Mochila Media
        
containerid GetItemExtraData(backpackitem);
        
GivePlayerBag(playeridbackpackitem);
        
tmpitem CreateItem(item_Wrench);//Chave de Roda
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Screwdriver);//Chave de Fenda
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Hammer);//Martelo
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_DoctorBag);//Mala de Doutor
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_DoctorBag);//Mala de Doutor
        
AddItemToContainer(containeridtmpitem)
        
SendClientMessage(playeridAZUL_CLARO"Vocк pegou seus equipamentos VIP 2!");
        return 
0;
    }
    else  
SendClientMessage(playeridBranco"Vocк nгo й Vip ou nгo tem level suficiente!");
    return 
1;

tentei e deu o mesmo erros

Agora esta assim:
Код:
CMD:equiparvip(playerid, params[])
{
    new
        backpackitem,
        containerid,
        tmpitem,
  	 Player[MAX_PLAYERS];
    if(Player[playerid][Vip] < 1) return SendClientMessage(playerid, Branco, "Vocк nгo й Vip ou nгo tem level suficiente!");
    {
        backpackitem = CreateItem(item_Backpack);//Mochila Media
        containerid = GetItemExtraData(backpackitem);

        GivePlayerBag(playerid, backpackitem);
Erros:
Код:
sss/core/player/commands.pwn(268) : error 001: expected token: ")", but found "["
sss/core/player/commands.pwn(268) : error 029: invalid expression, assumed zero
sss/core/player/commands.pwn(268) : warning 215: expression has no effect
sss/core/player/commands.pwn(268) : error 001: expected token: ";", but found "]"
sss/core/player/commands.pwn(268) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#4

Faz em switch
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)