Script does not load a file.
#1

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;
}
Reply
#2

Oh, and the server log says that it loads the gamemode, but when it cannot load the doors the server shuts itself down..
Reply
#3

I just ran trough all of the things that should be loaded while it's all fine.
Reply
#4

maybe a stupid question, butt why you have 3x "print("Gamemode started.");".
Reply
#5

Because I can.
Reply
#6

No triple-post.
See the man rules.

#OFF
OMG
Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 32 seconds.

Reply
#7

Still does not work...
Reply
#8

Quote:
Originally Posted by MathijsS
Посмотреть сообщение
maybe a stupid question, butt why you have 3x "print("Gamemode started.");".
Because he is using leaked NGRP script.
Reply
#9

Stop using leaked scripts and your ok.
Reply
#10

In fact the script is just the base for the final product.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)