Script doesnt load files - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Script doesnt load files (
/showthread.php?tid=299021)
Script doesnt load files -
Supercop - 23.11.2011
Was posted in another section but I realized it was the wrong section.
Hi, this is the part where it tells what to load:
pawn Код:
public OnGameModeInit()
{
print("Gamemode started.");
// Default Rates
print("Gamemode started.");
new a[][] =
{
"Unarmed (Fist)",
"Brass K"
};
#pragma unused a
print("Gamemode started.");
//InitDatabase();
//Audio_SetPack("default_pack", true);
djson_GameModeInit();
EnableStuntBonusForAll(0);
new servergmtextstr[128];
format(servergmtextstr, 128, "gamemodetext %s", SERVER_GM_TEXT);
SendRconCommand(servergmtextstr); // DO NOT REMOVE THIS
new string[42];
new string1[MAX_PLAYER_NAME];
ShowPlayerMarkers(PLAYER_MARKERS_MODE_STREAMED);
DisableInteriorEnterExits();
InitTurfWars();
//LoadTurfWars();
InitPaintballArenas();
LoadPaintballArenas();
InitEventPoints();
//LoadEventPoints();
LoadDynamicDoors();
print("Loaded Dynamic Doors.");
LoadDynamicMapIcons();
print("Loaded mapicons");
LoadHouses();
print("Loaded houses.");
LoadGates();
print("Loaded Gates");
LoadBoxer();
print("Loaded Boxer-information");
LoadStuff();
print("SUCCESFULLY LOADED MAIN INFORMATION.");
LoadElevatorStuff();
print("Elevators Loaded.");
LoadServerStats();
print("Server Stats loaded");
LoadThePay();
print("Paycheck information loaded");
LoadFamilies();
print("Families loaded.");
LoadPoints();
print("Point Information loaded!.");
LoadcDealerships();
print("LOADED SUCCESFUL.");
And after that some other things.
However, at the part "LoadDynamicDoors" it stops with loading, it suddenly doesn't work. I checked to determine what the error is and I am 99% sure that is the issue.
The thing is that the .cfg files are all properly placed, and locally hosted (on Windows) it works fine but at my new hosting provider which uses Linux it doesn't work.
pawn Код:
LoadDynamicDoors()
{
new arrCoords[25][64];
new strFromFile2[256];
new File: file = fopen("dynamicdoors.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(DDoorsInfo))
{
fread(file, strFromFile2);
splits(strFromFile2, arrCoords, '|');
strmid(DDoorsInfo[idx][ddDescription], arrCoords[0], 0, strlen(arrCoords[0]), 128);
DDoorsInfo[idx][ddCustomInterior] = strval(arrCoords[1]);
DDoorsInfo[idx][ddExteriorVW] = strval(arrCoords[2]);
DDoorsInfo[idx][ddExteriorInt] = strval(arrCoords[3]);
DDoorsInfo[idx][ddInteriorVW] = strval(arrCoords[4]);
DDoorsInfo[idx][ddInteriorInt] = strval(arrCoords[5]);
DDoorsInfo[idx][ddExteriorX] = floatstr(arrCoords[6]);
DDoorsInfo[idx][ddExteriorY] = floatstr(arrCoords[7]);
DDoorsInfo[idx][ddExteriorZ] = floatstr(arrCoords[8]);
DDoorsInfo[idx][ddExteriorA] = floatstr(arrCoords[9]);
DDoorsInfo[idx][ddInteriorX] = floatstr(arrCoords[10]);
DDoorsInfo[idx][ddInteriorY] = floatstr(arrCoords[11]);
DDoorsInfo[idx][ddInteriorZ] = floatstr(arrCoords[12]);
DDoorsInfo[idx][ddInteriorA] = floatstr(arrCoords[13]);
DDoorsInfo[idx][ddCustomExterior] = strval(arrCoords[14]);
DDoorsInfo[idx][ddVIP] = strval(arrCoords[15]);
DDoorsInfo[idx][ddFamily] = strval(arrCoords[16]);
DDoorsInfo[idx][ddFaction] = strval(arrCoords[17]);
DDoorsInfo[idx][ddAdmin] = strval(arrCoords[18]);
DDoorsInfo[idx][ddWanted] = strval(arrCoords[19]);
DDoorsInfo[idx][ddVehicleAble] = strval(arrCoords[20]);
DDoorsInfo[idx][ddColor] = strval(arrCoords[21]);
DDoorsInfo[idx][ddPickupModel] = strval(arrCoords[22]);
strmid(DDoorsInfo[idx][dPass], arrCoords[23], 0, strlen(arrCoords[23]), 24);
DDoorsInfo[idx][dLocked] = strval(arrCoords[24]);
if(!IsNull(DDoorsInfo[idx][ddDescription]))
{
CreateDynamicDoor(idx);
}
idx++;
}
fclose(file);
}
return 1;
}
Re: Script doesnt load files -
MathijsS - 23.11.2011
Your second tread?
Re: Script doesnt load files -
Fj0rtizFredde - 23.11.2011
Is you file named "dynamicdoors.cfg" (with small letters only?) Linux is case-sensitive so you need to check that everything is spelled correct. (With big letters where it should be etc.)
Re: Script doesnt load files -
Supercop - 24.11.2011
Yes, it is with small letters.
Re: Script doesnt load files -
Supercop - 25.11.2011
Anyone..?
Re: Script doesnt load files -
Supercop - 26.11.2011
Alright, after some time spent on trying to get the error I discovered that the file is being loaded properly, although it get bugged at CreateDynamicDoor...