[Ajuda] [debug]
#1

Boa tarde, como posso resolver isto?

[14:49:25] [debug] Run time error 4: "Array index out of bounds"
[14:49:25] [debug] Accessing element at index 65535 past array upper bound 1999
[14:49:25] [debug] AMX backtrace:
[14:49:25] [debug] #0 0023ffdc in public SetVehicleNumberPlateEx (0x0000ffff, 0x0029985 from gwm.amx
[14:49:25] [debug] #1 0024129c in ?? () from gwm.amx
[14:49:25] [debug] #2 0001010c in public SpawnCars () from gwm.amx
[14:49:25] [debug] #3 00011fb8 in public Streamer_OnGameModeInit () from gwm.amx
[14:49:25] [debug] #4 native CallLocalFunction () [004743b0] from samp-server.exe
[14:49:25] [debug] #5 000009a4 in public OnGameModeInit () from gwm.amx

Por favor qualquer tipo de ajuda e bem vinda...



"ou procuro um configurador "scripter" samp"
Reply
#2

Leia o tуpico todo

https://sampforum.blast.hk/showthread.php?tid=587209

E depois se nгo conseguir resolver o problema, volte aqui e poste as linhas "[debug]" com o GameMode a ser compilado em "debug mode" (leia o tуpico para perceber o que й isso).
Reply
#3

[debug] Run time error 4: "Array index out of bounds"
[20:09:50] [debug] Accessing element at index 65535 past array upper bound 1999
[20:09:50] [debug] AMX backtrace:
[20:09:50] [debug] #0 002e1acc in public SetVehicleNumberPlateEx (vehicleid=65535, plate[]=@0x00299840 "CarSell: 0001") at D:\SA-MP\Gm str\meu gmw alterado mapa todo\meu gmw alterado mapa todo\gamemodes\gwm.pwn:53571
[20:09:50] [debug] #1 002e331c in LoadCarSell () at D:\SA-MP\Gm str\meu gmw alterado mapa todo\meu gmw alterado mapa todo\gamemodes\gwm.pwn:53653
[20:09:50] [debug] #2 000147c0 in public SpawnCars () at D:\SA-MP\Gm str\meu gmw alterado mapa todo\meu gmw alterado mapa todo\gamemodes\gwm.pwn:2605
[20:09:50] [debug] #3 00016e60 in public Streamer_OnGameModeInit () at D:\SA-MP\Gm str\meu gmw alterado mapa todo\meu gmw alterado mapa todo\gamemodes\gwm.pwn:3591
[20:09:50] [debug] #4 native CallLocalFunction () [004743b0] from samp-server.exe
[20:09:50] [debug] #5 00000aec in public OnGameModeInit () at D:\SA-MP\Gm str\meu gmw alterado mapa todo\meu gmw alterado mapa todo\pawno\include\streamer.inc:323

Quote:

}

forward SetVehicleNumberPlateEx(vehicleid, plate[]);
public SetVehicleNumberPlateEx(vehicleid, plate[])
{
format(VehiclePlate[vehicleid],36,"%s",plate);
SetVehicleNumberPlate(vehicleid,plate);
}
GetName( p ){
new

Quote:

}
else if( VeiculoInfo[ _y ][ vPos ][ 0 ] == -2042.9574 ){
GaragemVagas[ VeiculoInfo[ _y ][ vVw ] ][ 2 ] = vCarSell[ _y ];
}
new placa[ 50 ];
format( placa, sizeof placa, "CarSell: %04d", _y );
SetVehicleNumberPlateEx( vCarSell[ _y ], placa );
conta ++;
}
}
fclose(file);
printf( "Carregados %d veнculos.", conta);
}
}

}

Quote:

//carssel
expocar[ 0 ] = AddStaticVehicle(536,1723.4642,-1750.0266,13.4386,202.0568,3,3); // exposicao
expocar[ 1 ] = AddStaticVehicle(411,1731.2594,-1750.3372,13.4238,147.4821,3,3); // exposicao
expocar[ 2 ] = AddStaticVehicle(521,1733.6611,-1789.5552,13.2587,47.6527,3,3); // exposicao
expocar[ 3 ] = AddStaticVehicle(451,1731.0498,-1795.0624,13.3892,51.6693,3,3); // exposicao
expocar[ 4 ] = AddStaticVehicle(439,1737.6355,-1794.5337,19.1621,66.8408,3,3); // exposicao
expocar[ 5 ] = AddStaticVehicle(562,1739.0806,-1787.6741,18.9372,71.4908,3,3); // exposicao
//CriarCarSell(); // caso i arquivo resetar, ativar esta funзгo
LoadCarSell();
}

Quote:

CriarPickupsGaragem();
for( new i; i < sizeof PosGaragem; i++ ){
GaragemVagas[ i ][ 0 ] = -1;
GaragemVagas[ i ][ 1 ] = -1;
GaragemVagas[ i ][ 2 ] = -1;
GaragemVagas[ i ][ 3 ] = -1;
}
SpawnCars();
//objects
AddStaticSprunk(0,-2221.0208,1048.6288,79.40,90.000000); // Sprunk Yakuza

Quote:

forward AddCar(carcoords);
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
forward ProxDetectorS(Float:radi, playerid, targetid);
forward ClearFamily(family);
forward ClearMarriage(playerid);
forward ClearPaper(paper);
forward ClearCrime(playerid);
forward FishCost(playerid, fish);
forward ClearFishes(playerid);

Reply
#4

Em que lugares chamas a funзгo SetVehicleNumberPlateEx? Esse erro que tens deve-se ao facto de estares a tentar colocar uma matrнcula num carro inexistente (carro ID 65535). Uma soluзгo rбpida (mas nгo muito exemplar) seria adicionar uma condiзгo na funзгo SetVehicleNumberPlateEx para verificar se ID do carro fosse 65535. Se fosse, nгo fazia nada. Se nгo, metia a matricula no carro.
Reply
#5

Nao sei mexer muito bem com isso me pode dar uma ajuda?
Reply
#6

Quote:
Originally Posted by JoaoHDI
Посмотреть сообщение
Nao sei mexer muito bem com isso me pode dar uma ajuda?
PHP код:
forward SetVehicleNumberPlateEx(vehicleidplate[]);
public 
SetVehicleNumberPlateEx(vehicleidplate[])
{
    if(
vehicleid == 65535) return 0;
    
format(VehiclePlate[vehicleid],36,"%s",plate);
    
SetVehicleNumberPlate(vehicleid,plate);
    return 
1;

Reply
#7

hei, obrigadao ajudou bastante
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)