Re: How to create a vehicle system using Y_INI and Y_CMD -
Hayden_Almeida - 16.11.2015
Error in this line:
Code:
VehicleInfo[vehicleID][vLocked] = INI_Int("locked") == 1 ? true : false;
Code:
error 017: undefined symbol "INI_Int"
Error in this line too:
Code:
format(strLoc, sizeof(strLoc), "Loc%d", i), INI_Float(strLoc, VehicleInfo[vehicleID][vLoc][i]);
Code:
C:Desktop\SAMP - SERVER\samp037_svr_R2-1-1_win32\gamemodes\HA-GM.pwn(6272) : error 029: invalid expression, assumed zero
C:SAMP - SERVER\samp037_svr_R2-1-1_win32\gamemodes\HA-GM.pwn(6272) : error 001: expected token: ";", but found "return"
Re: How to create a vehicle system using Y_INI and Y_CMD -
Hayden_Almeida - 17.11.2015
UPPPPP
Re: How to create a vehicle system using Y_INI and Y_CMD -
N0FeaR - 19.11.2015
Good job!
Re: How to create a vehicle system using Y_INI and Y_CMD -
Karan007 - 19.11.2015
Nice one!
Re: How to create a vehicle system using Y_INI and Y_CMD -
Hayden_Almeida - 20.11.2015
Every time the server LOADs the GM, the variable of the vehicle:
Code:
VehicleInfo[vehicleid][vOwner]
Adds more 1 Letter.
Example:
Meu nick is Hayden_Almeida
When i create the vehicle and after this i close the server, it saves the file like:
Code:
owner = Hayden_Almeida
When i open the Server and i enter the vehicle and print what is the string in
Code:
VehicleInfo[vehicleid][vOwner]
it says:
and if i close the server, the file now contains:
Code:
owner = HHayden_Almeida
Re: How to create a vehicle system using Y_INI and Y_CMD -
DiamondGaming - 25.12.2017
https://ibb.co/cQbh4m
Re: How to create a vehicle system using Y_INI and Y_CMD -
DiamondGaming - 25.12.2017
(224) : warning 217: loose indentation
(226) : error 029: invalid expression, assumed zero
(226) : error 001: expected token: ")", but found "return"
(226) : fatal error 107: too many error messages on one line
Re: How to create a vehicle system using Y_INI and Y_CMD -
Matyaas - 22.02.2018
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;
}
Re: How to create a vehicle system using Y_INI and Y_CMD -
freddiebox - 01.04.2018
Having the same problem with the LoadVehicleData group.
But also error 017: undefined symbol "INI_Int".