[Ajuda] o q tem de errado ?
#1

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

erro:
PHP код:
SS/Core/Player/Commands.pwn(74) : warning 225unreachable code
SS
/Core/Player/Commands.pwn(74) : warning 217loose indentation
SS
/Core/Player/Commands.pwn(74) : error 029invalid expressionassumed zero
SS
/Core/Player/Commands.pwn(74) : warning 215expression has no effect
SS
/Core/Player/Commands.pwn(74) : error 001expected token";"but found "if"
SS/Core/Player/Commands.pwn(75) : warning 217loose indentation
SS
/Core/Player/Commands.pwn(91) : error 001expected token";"but found "-identifier-"
SS/Core/Player/Commands.pwn(94) : warning 225unreachable code
SS
/Core/Player/Commands.pwn(94) : warning 217loose indentation
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
3 Errors

Reply
#2

pawn Код:
CMD:equiparvip(playerid, params[])
{
    new
        backpackitem,
        containerid,
        tmpitem;

    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);

        tmpitem = CreateItem(item_Wrench);//Chave Inglesa
        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);//Maleta de Doutor
        AddItemToContainer(containerid, tmpitem);
        SendClientMessage(playerid, AZUL_CLARO, "Vocк pegou seus equipamentos VIP!");
        return 0;
     }
        else if(Player[playerid][Vip] < 2) 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);

        tmpitem = CreateItem(item_Wrench);//Chave Inglesa
        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);//Maleta de Doutor
        AddItemToContainer(containerid, tmpitem);
        tmpitem = CreateItem(item_DoctorBag);//Maleta de Doutor
        AddItemToContainer(containerid, tmpitem);
        SendClientMessage(playerid, AZUL_CLARO, "Vocк pegou seus equipamentos VIP 2!");
        return 0;
    }
    return 1;
}
testa ai
Reply
#3

SS/Core/Player/Commands.pwn(74) : warning 225: unreachable code
SS/Core/Player/Commands.pwn(74) : warning 217: loose indentation
SS/Core/Player/Commands.pwn(74) : error 029: invalid expression, assumed zero
SS/Core/Player/Commands.pwn(74) : warning 215: expression has no effect
SS/Core/Player/Commands.pwn(74) : error 001: expected token: ";", but found "if"
SS/Core/Player/Commands.pwn(75) : warning 217: loose indentation
SS/Core/Player/Commands.pwn(94) : warning 225: unreachable code
SS/Core/Player/Commands.pwn(94) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

deu isso
Reply
#4

vo analizar o cуdigo se eu achar o erro postarei aqui
Por favor poste sу mente as linhas do erro
Reply
#5

74 - else if(Player[playerid][Vip] < 2) return SendClientMessage(playerid, Branco, "Vocк nгo й Vip ou nгo tem level suficiente!");
Reply
#6

pawn Код:
else if(Player[playerid][Vip] < 2);
return SendClientMessage(playerid, -1, "Vocк nгo й Vip ou nгo tem level suficiente!");
tenta ai
Reply
#7

@zDbruno, Olha se resolve.
PHP код:
 CMD:equiparvip(playeridparams[])
{
    new 
backpackitem,
        
containerid,
        
tmpitem;

    if(
Player[playerid][Vip] == 1)
    {
        
backpackitem CreateItem(item_Backpack);//Mochila Media
        
containerid GetItemExtraData(backpackitem);

        
GivePlayerBag(playeridbackpackitem);

        
tmpitem CreateItem(item_Wrench);//Chave Inglesa
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Screwdriver);//Chave de Fenda
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Hammer);//Martelo
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_DoctorBag);//Maleta 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 Inglesa
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Screwdriver);//Chave de Fenda
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_Hammer);//Martelo
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_DoctorBag);//Maleta de Doutor
        
AddItemToContainer(containeridtmpitem);
        
tmpitem CreateItem(item_DoctorBag);//Maleta 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


Forum Jump:


Users browsing this thread: 3 Guest(s)