error 033: array must be indexed
#1

Buenas, disculpen, al momento de borrar un vehнculo en vez de reiniciar las variables del coche poniendo InformacionVehiculo_[params[0]][vColor] = 0 y asн con todo quiero todo en una sola lнnea, para mantener el cуdigo lo mejor posible, me basй en este topic https://sampforum.blast.hk/showthread.php?tid=560318 y hice lo siguiente en el comando.

Код:
CMD:borrarauto(playerid, params[])
{
	if(InformacionJugador_[playerid][pAdministrador] < 0) return 0;
	if(IsPlayerDuty(playerid))
	{
		if(sscanf(params, "i", params[0])) return SendSyntaxMessage(playerid, "/borrarauto [ID]");
		if(InformacionVehiculo_[params[0]][vSQLID] != 0)
		{
			new Query[50];
			format(Query, sizeof(Query), "DELETE FROM vehiculos WHERE vSQLID = `%d`", params[0]);
			mysql_tquery(MySQL, Query), --TotalVehiculos;

			new tmp[vInfo];
				tmp[InformacionVehiculo_] = 0; 

				InformacionVehiculo_[params[0]] = tmp;

			DestroyDynamic3DTextLabel(InformacionVehiculo_[params[0]][vTexto]);
			DestroyVehicle(InformacionVehiculo_[params[0]][vSQLID]);
		}
	}
	return 1;
}
Pero me sale el error de "error 033: array must be indexed (variable "InformacionVehiculo_")" en InformacionVehiculo_[params[0]] = tmp; їA quй se debe? asн tengo el enum del vehнculo.

Код:
enum vInfo
{
	vSQLID,/* ID del Vehнculo(Base de Datos */
	vModelo,/* Modelo del Vehнculo */
	vColor[2],/* Color 1/2 del Vehнculo */
	vPrecio,/* Precio del Vehнculo */
	vMotor,/* Motor del Vehнculo(0 = Apagado / 1 = Encendido */
	vPropietario[MAX_PLAYER_NAME + 1],/* Nombre del Dueсo */
	Float:vPos[3],/* Posiciуn X/Y/Z del Vehнculo */
	Float:vAngle,/* Angle del Vehнculo */
	Float:vSpawn[3],/* Spawn del Vehнculo en Venta */
	Float:vSAngle,/* Angle del Vehнculo en Venta */
	Float:vParking[3],/* Spawn del Vehнculo de Usuario */
	Float:vPAngle,/* Angle del Vehнculo de Usuario */
	vVirtualWorld,/* Mundo del Vehнculo */
	vInterior,/* Interior del Vehнculo */
	vEstado,/* Estado del Vehнculo(0 = Comprado / 1 = En Venta) */
	vTipo,/* Tipo del Vehнculo(0 = Normal / 1 = Premium) */
	vCantidad,/* Cantidad en Venta */
	vPartes[4],/* Partes de la Carrocerнa(Daсos) */
	Float:vDamage,/* Vida del Vehнculo */
    Float:vKilometros,/* Kilуmetros del Vehнculo */
    Text3D:vTexto[MAX_VEHICLES],/* Texto en Venta */
    vMatricula[10]/* Matrнcula del Vehнculo */
};
static InformacionVehiculo_[MAX_VEHICLES][vInfo];
Reply


Messages In This Thread
error 033: array must be indexed - by Fagrinht - 22.09.2016, 20:47
Respuesta: error 033: array must be indexed - by adri1 - 22.09.2016, 22:25
Respuesta: error 033: array must be indexed - by Fagrinht - 23.09.2016, 01:29
Respuesta: error 033: array must be indexed - by adri1 - 23.09.2016, 19:05
Respuesta: error 033: array must be indexed - by Parka - 23.09.2016, 21:36
Respuesta: error 033: array must be indexed - by adri1 - 23.09.2016, 21:42
Respuesta: error 033: array must be indexed - by Parka - 23.09.2016, 21:47
Respuesta: error 033: array must be indexed - by adri1 - 23.09.2016, 21:52
Respuesta: error 033: array must be indexed - by Parka - 23.09.2016, 21:58
Respuesta: error 033: array must be indexed - by adri1 - 23.09.2016, 22:01

Forum Jump:


Users browsing this thread: 1 Guest(s)