[Ajuda] error 028: invalid subscript (not an array or too many subscripts): "VCVGang"
#1

error 028: invalid subscript (not an array or too many subscripts): "VCVGang"

O que pode ser?

Linha:

PHP код:
 if(vm == VCVGang[i]) 
Cуdigo completo:

PHP код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        for(new 
0sizeof(VCVGang); ++)
        {
            new 
vm GetPlayerVehicleID(playerid);
            if(
vm == VCVGang[i])
            {
                if(
PlayerInfo[playerid][pMembro] == 19 || PlayerInfo[playerid][pLider] == 19)
                {
                    
SendClientMessage(playerid,-1,"[ERRO] Vocк nгo й do Comando Vermelho.");
                    
RemovePlayerFromVehicle(playerid);
                }
            }
        }
    } 
Help.. e.e
Reply
#2

Como foi criada estб variavel?
Reply
#3

PHP код:
new VCVGangCar[20]; 
Reply
#4

affs. alguem ajuda aк? =/
Reply
#5

Vocк mandou a variбvel errada amigo.
Reply
#6

Para evitar problemas, vo enviar tudo que eu criei com a VCVGang..

PHP код:
new VCVGangCar[20]; 
PHP код:
 if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        for(new 
0sizeof(VCVGang); ++)
        {
            new 
vm GetPlayerVehicleID(playerid);
            if(
vm == VCVGang[i])
            {
                if(
PlayerInfo[playerid][pMembro] == 19 || PlayerInfo[playerid][pLider] == 19)
                {
                    
SendClientMessage(playerid,-1,"[ERRO] Vocк nгo й do Comando Vermelho.");
                    
RemovePlayerFromVehicle(playerid);
                }
            }
        }
    } 
PHP код:
//cv//
    
VCVGang[0] = AddStaticVehicleEx(522,2326.30004883,-1908.09997559,13.19999981,90.00000000,3,3,15); //NRG-500
    
VCVGang[1] = AddStaticVehicleEx(522,2326.69995117,-1918.40002441,13.19999981,90.00000000,3,3,15); //NRG-500
    
VCVGang[2] = AddStaticVehicleEx(522,2342.30004883,-1898.59997559,13.19999981,180.00000000,3,3,15); //NRG-500
    
VCVGang[3] = AddStaticVehicleEx(522,2344.80004883,-1898.90002441,13.19999981,180.00000000,3,3,15); //NRG-500
    
VCVGang[4] = AddStaticVehicleEx(522,2347.80004883,-1899.30004883,13.19999981,180.00000000,3,3,15); //NRG-500
    
VCVGang[5] = AddStaticVehicleEx(522,2350.50000000,-1899.30004883,13.19999981,180.00000000,3,3,15); //NRG-500
    
VCVGang[6] = AddStaticVehicleEx(562,2351.30004883,-1924.19995117,13.10000038,91.59899902,3,1,15); //Elegy
    
VCVGang[7] = AddStaticVehicleEx(562,2333.30004883,-1919.50000000,12.69999981,359.59289551,3,1,15); //Elegy
    
VCVGang[8] = AddStaticVehicleEx(562,2285.00000000,-1930.19995117,12.39999962,179.58795166,3,1,15); //Elegy
    
VCVGang[9] = AddStaticVehicleEx(562,2261.50000000,-1929.80004883,12.39999962,179.58251953,3,1,15); //Elegy
    
VCVGang[10] = AddStaticVehicleEx(565,2351.39990234,-1929.69995117,13.10000038,90.00000000,3,1,15); //Flash
    
VCVGang[11] = AddStaticVehicleEx(565,2238.30004883,-1930.50000000,12.39999962,181.00000000,3,1,15); //Flash
    
VCVGang[12] = AddStaticVehicleEx(565,2249.80004883,-1921.90002441,13.10000038,180.99969482,3,1,15); //Flash
    
VCVGang[13] = AddStaticVehicleEx(565,2249.80004883,-1929.80004883,13.10000038,180.99426270,3,1,15); //Flash
    
VCVGang[14] = AddStaticVehicleEx(567,2333.30004883,-1908.00000000,12.89999962,180.00000000,3,3,15); //Savanna
    
VCVGang[15] = AddStaticVehicleEx(567,2296.80004883,-1911.69995117,13.39999962,180.00000000,3,3,15); //Savanna
    
VCVGang[16] = AddStaticVehicleEx(567,2296.80004883,-1921.90002441,13.39999962,180.00000000,3,3,15); //Savanna
    
VCVGang[17] = AddStaticVehicleEx(567,2296.80004883,-1930.69995117,13.39999962,180.00000000,3,3,15); //Savanna
    
VCVGang[18] = AddStaticVehicleEx(487,2260.89990234,-1918.09997559,20.39999962,0.00000000,3,3,15); //Maverick
    
VCVGang[19] = AddStaticVehicleEx(487,2285.00000000,-1917.90002441,20.39999962,0.00000000,3,3,15); //Maverick 
PHP код:
public VCVGang(carid)
{
    if((
carid >= 233) && (carid <= 243) && (carid <= 562) && (carid <= 565) && (carid <= 567) && (carid <= 522) && (carid <= 487))
    {
        return 
true;
    }
    return 
0;

tб aн. =/
Reply
#7

Renomeie sua variбvel "VCVGangCar" para "VCVGang"
Reply
#8

nгo acredito q n percebi isso..

mas olha, deu isso:

error 021: symbol already defined: "VCVGang"

what? jб nгo estб definido?
Reply
#9

Quote:
Originally Posted by duuuwh
Посмотреть сообщение
nгo acredito q n percebi isso..

mas olha, deu isso:

error 021: symbol already defined: "VCVGang"

what? jб nгo estб definido?
nos queremos o VCVGang nгo o VCVGangCar '-'
Reply
#10

Sim, tava errado, nгo era VCVGangCar, eu mudei pra VCVGang, e agora tб falando que nгo tб definido, sendo que estб definido. '-'
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)