[Tutorial] How to create a vehicle system using Y_INI and Y_CMD
#28

Code:
C:\Users\matia\Desktop\Actualizacion SV\filterscripts\Personal.pwn(24) : warning 203: symbol is never used: "vehicleID"
C:\Users\matia\Desktop\Actualizacion SV\filterscripts\Personal.pwn(72) : error 047: array sizes do not match, or destination array is too small
C:\Users\matia\Desktop\Actualizacion SV\filterscripts\Personal.pwn(82) : error 029: invalid expression, assumed zero
C:\Users\matia\Desktop\Actualizacion SV\filterscripts\Personal.pwn(82) : error 001: expected token: ";", but found "return"
C:\Users\matia\Desktop\Actualizacion SV\filterscripts\Personal.pwn(82) : error 017: undefined symbol "i"
C:\Users\matia\Desktop\Actualizacion SV\filterscripts\Personal.pwn(82) : fatal error 107: too many error messages on one line

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


5 Errors.
..........................
CODE:
Code:
stock VehicleLoad(vehicleID, file[])
// This function will load the vehicle provided by the id when the server starts.
{
	INI_ParseFile(file, "LoadVehicleData", .bExtra = true, .extra = vehicleID); // Parse the vehicle data from the INI file.
	VehicleCreate(VehicleInfo[vehicleID][vModel], VehicleInfo[vehicleID][vLoc], VehicleInfo[vehicleID][vColor1], VehicleInfo[vehicleID][vColor2], VehicleInfo[vehicleID][vRespawn],
	VehicleInfo[vehicleID][vOwner], VehicleInfo[vehicleID][vLocked]); // Creates the vehicle from the information we loaded and parsed. Pretty self-explanatory.
}

forward LoadVehicleData(vehicleID, name[], value[]);
public LoadVehicleData(vehicleID, name[], value[]) // This a callback with the parameter of the vehicleID send from our VehicleLoad function. This function will pretty much parse the data from the file.
{
	new strLoc[8]; // Will hold the location key name dynamically.
	// The first argument is the key and the second argument is the data which will hold the value of that key.
	INI_Int("model", VehicleInfo[vehicleID][vModel]);
	for(new i = 0; i < 4; i++) format(strLoc, sizeof(strLoc), "Loc%d", i), INI_Float(strLoc, VehicleInfo[vehicleID][vLoc][i]);
	// Looping through our location data and retrive it. Loc0 = LocX, Loc1 = LocY, Loc2 = LocZ, Loc3 = LocA.
	INI_Int("color1", VehicleInfo[vehicleID][vColor1]); // You should've guessed it by now.
	INI_Int("color2", VehicleInfo[vehicleID][vColor2]);
	INI_Int("respawn", VehicleInfo[vehicleID][vRespawn]);
	INI_String("owner", VehicleInfo[vehicleID][vOwner], MAX_PLAYER_NAME);
	VehicleInfo[vehicleID][vLocked] = INI_Int("locked") == 1 ? true : false;
	//Converting the locked data from int(whole number) to bool(true/false) and assign it.

	return 1;
}
Reply


Messages In This Thread
How to create a vehicle system using Y_INI and Y_CMD - by T0pAz - 16.02.2013, 04:50
Re: How to create a vehicle system using Y_INI and Y_CMD - by seanny - 16.02.2013, 08:19
Re: How to create a vehicle system using Y_INI and Y_CMD - by xDaidal0S - 16.02.2013, 09:15
Re: How to create a vehicle system using Y_INI and Y_CMD - by THE_KING$5$ - 16.02.2013, 09:18
Re: How to create a vehicle system using Y_INI and Y_CMD - by Jason_Dealley - 16.02.2013, 11:44
Re: How to create a vehicle system using Y_INI and Y_CMD - by T0pAz - 16.02.2013, 15:46
Re: How to create a vehicle system using Y_INI and Y_CMD - by DiGiTaL_AnGeL - 16.02.2013, 17:20
Re: How to create a vehicle system using Y_INI and Y_CMD - by Cameryn - 17.02.2013, 15:52
Re: How to create a vehicle system using Y_INI and Y_CMD - by TommyVer - 21.02.2013, 22:34
Re: How to create a vehicle system using Y_INI and Y_CMD - by [CG]Milito - 21.02.2013, 23:28
Re: How to create a vehicle system using Y_INI and Y_CMD - by Cameryn - 22.02.2013, 03:54
Respuesta: How to create a vehicle system using Y_INI and Y_CMD - by CrossOv3r - 24.02.2013, 00:28
AW: How to create a vehicle system using Y_INI and Y_CMD - by Blackazur - 24.02.2013, 11:57
AW: How to create a vehicle system using Y_INI and Y_CMD - by Ryan_Obeles - 24.02.2013, 12:56
Re: AW: How to create a vehicle system using Y_INI and Y_CMD - by Cameryn - 24.02.2013, 16:51
AW: How to create a vehicle system using Y_INI and Y_CMD - by Ryan_Obeles - 25.02.2013, 09:05
Re: AW: How to create a vehicle system using Y_INI and Y_CMD - by Cameryn - 25.02.2013, 18:10
Re: How to create a vehicle system using Y_INI and Y_CMD - by MadafakaPro - 07.04.2013, 11:58
Re: How to create a vehicle system using Y_INI and Y_CMD - by mrkiller90 - 11.04.2014, 13:19
Re: How to create a vehicle system using Y_INI and Y_CMD - by BleverCastard - 11.04.2014, 21:58
Re: How to create a vehicle system using Y_INI and Y_CMD - by Hayden_Almeida - 16.11.2015, 21:55
Re: How to create a vehicle system using Y_INI and Y_CMD - by Hayden_Almeida - 17.11.2015, 17:06
Re: How to create a vehicle system using Y_INI and Y_CMD - by N0FeaR - 19.11.2015, 06:36
Re: How to create a vehicle system using Y_INI and Y_CMD - by Karan007 - 19.11.2015, 09:18
Re: How to create a vehicle system using Y_INI and Y_CMD - by Hayden_Almeida - 20.11.2015, 13:00
Re: How to create a vehicle system using Y_INI and Y_CMD - by DiamondGaming - 25.12.2017, 15:01
Re: How to create a vehicle system using Y_INI and Y_CMD - by DiamondGaming - 25.12.2017, 15:12
Re: How to create a vehicle system using Y_INI and Y_CMD - by Matyaas - 22.02.2018, 04:17
Re: How to create a vehicle system using Y_INI and Y_CMD - by freddiebox - 01.04.2018, 10:57

Forum Jump:


Users browsing this thread: 2 Guest(s)