Page MenuHomeFeedback Tracker

Cannot access $mission folder before mission was initialized
Confirmed Internally, NormalPublic

Description

I am trying to load configs from a remote server at the beginning of the server restart. This works fine for json files stored in the $profile: folder, but for some reason not with the $mission: file prefix. I don't see any reason why this would not be possible before the MissionServer class is initialized since the mpmission is already defined in the serverDZ.cfg at server start

Details

Severity
Block
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
General

Event Timeline

LBmaster created this task.Jan 6 2025, 6:58 PM
Geez changed the task status from New to Need More Info.Jan 8 2025, 10:08 AM
Geez added a subscriber: Geez.

Hello LBmaster.
Can you please provide more detailed info or repro steps? We did not find any issues on our end but it is possible we have followed different steps than you.
Regards,
Geez

I tried to overwrite files in the constructor of the DayZGame class. So this would look something like this:

modded class DayZGame {

    void DayZGame(){
        FileHandle handle = OpenFile("$mission:test.txt", FileMode.WRITE);
        if (handle == 0) {
            Print("Could not write to $mission:test.txt");
            return;
        }
        FPrintln(handle, "test content");
        CloseFile(handle);
    }

}

The handle will be invalid here. The same is true when trying to iterate through files with the FindFileHandle here. The results will be empty. When I do the exact same thing in the MissionServer class, everything works fine

Geez changed the task status from Need More Info to Confirmed Internally.Jan 9 2025, 10:54 AM