Jump to content
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×