Unable to load "vehicles.txt" using mSelection -
Feuille - 05.03.2017
Hello guys, i'm currently facing to a problem, I did a car spawner system using the mSelection include, but when I load my game mode i get the following error: "-mSelection- WARNING: Failed to load list: "Ids/vehicles.txt" "
Note: I also tried to move the vehicles.txt file directly under the scriptfiles folder (and i updated the script too for matching)
Here's my code:
Код:
new vehicleList = mS_INVALID_LISTID;
public OnGameModeInit()
{
vehicleList = LoadModelSelectionMenu("Ids/vehicles.txt");//When I tried to put that file directly under the scriptfiles i also changed the path here.
return 1;
}
CMD:creervehicule(playerid, params[])//Command used to show the Menu.
{
if(pStats[playerid][adminLevel] >= STAFF_ADMIN)
{
ShowModelSelectionMenu(playerid, vehicleList, "|Vйhicules|");
}
else
{
SCM(playerid,COLOR_ERROR,MESSAGE_NO_ACCESS);
}
return 1;
}
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
if(listid == vehicleList)
{
if(response)
{
SCM(playerid,COLOR_SERVER,"[Serveur] Votre vйhicule administratif vient d'apparaоtre.");
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
CreateVehicle(modelid, x + 2.5, y, z + 2.5, 0.0, random(128), random(128), -1);
}
return 1;
}
return 1;
}
Thank you in advance for any help you will give.
PS: I followed the tutorial on the official mSelection's thread.
Sorry if my english was bad.
Re: Unable to load "vehicles.txt" using mSelection -
Fairuz - 05.03.2017
Put vehicles.txt inside the Ids folder
Re: Unable to load "vehicles.txt" using mSelection -
Feuille - 06.03.2017
Quote:
Put vehicles.txt inside the Ids folder
|
Thanks you for your answer, but the vehicles.txt file is already under the Ids folder.
I also tried to put it directly under the scriptfiles folder and I changed the path in the script too, but I get the warning anyway.
Re: Unable to load "vehicles.txt" using mSelection -
4D1L - 06.03.2017
Quote:
Originally Posted by Feuille
Thanks you for your answer, but the vehicles.txt file is already under the Ids folder.
I also tried to put it directly under the scriptfiles folder and I changed the path in the script too, but I get the warning anyway.
|
Have you tried placing the text file into scriptfiles/IDs/ folder?
Re: Unable to load "vehicles.txt" using mSelection -
Toroi - 06.03.2017
Show us your Vehicles.txt file
Re: Unable to load "vehicles.txt" using mSelection -
Feuille - 06.03.2017
Thank you all, I solved the problem.
This :
Код:
vehicleList = LoadModelSelectionMenu("Ids/vehicles.txt");
should be:
Код:
vehicleList = LoadModelSelectionMenu("Ids/vehicles.txt.txt");
My error is simple, the name of the file is "vehicles.txt" and the extension is .txt so the result is: "vehicles.txt.txt"
I should just write "vehicles" instead of "vehicles.txt".
With windows, we don't need to specify the file's extension, by default it's .txt, but we don't see it.
Re: Unable to load "vehicles.txt" using mSelection -
Toroi - 06.03.2017
Control Panel > File Explorer Options
Make sure that option is disabled, so it don't happen to you again.
Re: Unable to load "vehicles.txt" using mSelection -
Feuille - 06.03.2017
Quote:
Control Panel > File Explorer Options

Make sure that option is disabled, so it don't happen to you again.
|
Good idea.