Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

BeanieFancier

Mission file in Modding Basics Tutorial fails to load

Recommended Posts

Hi all,

I'm currently making my way through the Modding Basics Tutorial at https://community.bistudio.com/wiki/DayZ:Modding_Basics. I've followed all the steps, but when I try and start up the game it gets stuck loading up and gives me the error message

Mission script has no main function, player connect will stay disabled!

My mission file looks like this and is directly copy-pasted from https://community.bistudio.com/wiki/DayZ:Modding_Basics#Singleplayer.

Mission CreateCustomMission(string path)
{
    return new MissionGameplay();
}

void main()
{
    PlayerBase player;
    ItemBase item;

    // Create player
    player = PlayerBase.Cast((GetGame().CreatePlayer(NULL, "SurvivorF_Linda", "2200 10 2200", 0, "NONE")));

    // Spawn a black t-shirt
    item = player.GetInventory().CreateInInventory("TShirt_Black");

    // Spawn an apple in the t-shirt, don't redefine 'item' so we can still spawn other items in the t-shirt
    item.GetInventory().CreateInInventory("Apple");

    // Select player the client will be controlling
    GetGame().SelectPlayer(NULL, player);
}

I'm launching then game as indicated in the tutorial with

start /D "path\to\my\install" DayZDiag_x64.exe "-mod=P:\Mods\@FirstMod" "-mission=./missions/firstMission.ChernarusPlus" -filePatching

I'm probably missing something very obvious but I've started over three times now and can't see what I'm doing wrong.

Anyone have a hint? 🙂

Beanie

Edited by BeanieFancier

Share this post


Link to post
Share on other sites

I'm also doing the same, but I'm getting hung up at the multiplayer section.

Following the tutorial to the letter leads to an error reading the mission files.
However, creating a folder named "mpmissions", (the tutorial just says to create "missions"), adding a folder inside there called "dayzOffline.chernarusplus" and copying a standard init.c from my "DayZServer" folder (where the tutorial suggests getting a copy of the ServerDZ.cfg file from) allows a multiplayer server to be created and be joinable following the rest of the steps.

Is this the correct way to create the multiplayer server in the article, and those steps have just been missed?
Tutorial: https://community.bistudio.com/wiki/DayZ:Modding_Basics

Share this post


Link to post
Share on other sites

×