Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
QQuasaRR

Помогите с ошибкой Unknown Type MissionServer

 

Всем привет. Пытаюсь сделать систему навыков и столкнулся с проблемой: Unknown Type MissionServer. Долго думал и всё ровно не понял из за чего происходит ошибка.
Структура мода:

  • GFTPerks
  • scripts
  • 4_World, 5_Mission
    В 4_World находится playerbase.c, в нём такой код
    
    #include "GFTPerks/scripts/5_Mission/GFTPerks/missionserver.c"
    #include "GFTPerks/scripts/5_Mission/GFTPerks/missiongameplay.c"
    modded class PlayerBase
    {
        private int strengthLevel;
        private float strengthExperience;
        private ref Timer strengthTimer;
    
        void PlayerBase()
        {
            strengthLevel = 0;
            strengthExperience = 0;
            strengthTimer = new Timer();
            strengthTimer.Run(60, this, "UpdateStrength", NULL, true);
            LoadStrengthData();
        }
    
        override void OnJumpStart()
        {
            super.OnJumpStart();
            AddStrengthExperience(0.2);
        }
    
        void AddStrengthExperience(float amount)
        {
            strengthExperience += amount;
            if (strengthExperience >= 100)
            {
                strengthExperience -= 100;
                strengthLevel++;
                if (strengthLevel > 30)
                {
                    strengthLevel = 30;
                    strengthExperience = 0;
                }
            }
            SaveStrengthData();
        }
    
        void UpdateStrength()
        {
            if (GetWeight() > 20000) // проверка на вес игрока
            {
                AddStrengthExperience(4);
            }
        }
    
        int GetStrengthLevel()
        {
            return strengthLevel;
        }
    
        float GetStrengthExperience()
        {
            return strengthExperience;
        }
    
        void SaveStrengthData()
        {
            if (GetGame().IsServer() && GetGame().IsMultiplayer())
            {
                Mission mission = GetGame().GetMission();
                MissionServer missionServer = MissionServer.Cast(mission);
                if (missionServer)
                {
                    PersistentStorage storage = missionServer.GetPersistentStorage();
                    if (storage)
                    {
                        storage.SetPlayerData(this.GetIdentity().GetId(), "StrengthLevel", strengthLevel);
                        storage.SetPlayerData(this.GetIdentity().GetId(), "StrengthExperience", strengthExperience);
                    }
                }
            }
        }
    
        void LoadStrengthData()
        {
            if (GetGame().IsServer() && GetGame().IsMultiplayer())
            {
                Mission mission = GetGame().GetMission();
                MissionServer missionServer = MissionServer.Cast(mission);
                if (missionServer)
                {
                    PersistentStorage storage = missionServer.GetPersistentStorage();
                    if (storage)
                    {
                        strengthLevel = storage.GetPlayerDataInt(this.GetIdentity().GetId(), "StrengthLevel");
                        strengthExperience = storage.GetPlayerDataFloat(this.GetIdentity().GetId(), "StrengthExperience");
                    }
                }
            }
        }
    }

    И в 5_World лежит missionserver.c.

    missionserver.c:
     

    
    modded class MissionServer : MissionBase
    {
        private ref PersistentStorage m_Storage;
    
        override void OnInit()
        {
            super.OnInit();
            Print("GFT Perks мод инициализирован!");
            m_Storage = new PersistentStorage();
            Print("GFT Perks: PersistentStorage инициализирован.");
        }
    
        PersistentStorage GetPersistentStorage()
        {
            return m_Storage;
        }
    }

    Буду очень признателен за помощь!


Скажу сразу: Я не знаю почему ошибка выдаётся из мода sf_radio, если все моды убрать то ошибка исходит из playerbase.c
Crash log:
 

---------------------------------------------
Log C:\Program Files (x86)\Steam\steamapps\common\DayZServer\profiles\crash_2024-05-23_00-23-05.log started at 23.05. 00:23:07



------------------------------------
Desktop-ZDP83, 23.05 2024 00:23:07
Can't compile "World" script module!

sf_radio/scripts/4_World/useractioncomponent/actions/ќХС*С.wss(71): Unknown type 'MissionServer'

Runtime mode
CLI params: port 2302 config serverDZ.cfg cfg basic.cfg profiles profiles user user dologs  adminlog  netlog  freezecheck  mod C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@Namalsk Survival;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@Namalsk Island;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@CF;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@Syndicate Equips Pack;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@Dabs Framework;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@VPPAdminTools;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@Advanced Weapon Scopes;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@Syndicate Attachments Pack;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@Tactical Flava;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@SNAFU Weapons;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@sf_radio;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@Vehicle3PP;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@InventoryInCar;C:\Program Files (x86)\Steam\steamapps\common\DayZ\!Workshop\@Inventory Move Sounds;@GFT Scripts;@GFTPerks BEpath C:\Program Files (x86)\Steam\steamapps\common\DayZServer\battleye 


Script log:
 

---------------------------------------------
Log C:\Program Files (x86)\Steam\steamapps\common\DayZServer\profiles\script_2024-05-23_00-23-05.log started at 23.05. 00:23:06

SCRIPT       : Registered 347 temporary action enum(s), UAN==347
SCRIPT       : ... Backlit Effects Enabled
SCRIPT       : VPPNotificationManager()
SCRIPT       : [VPPAT] Internal VPPNotifications module loaded!
SCRIPT       : [DayZ Game]:: DayZGame(): Initializing V++ Admin Tools.
SCRIPT       : [GFT] -> SCRIPT STARTED
SCRIPT    (W): @"EFT_FlashLights\scripts\4_World/ranger_optic.c,4": Missing ';' at the end of line
SCRIPT    (E): @"sf_radio/scripts/4_World/useractioncomponent/actions/ќХС*С.wss,71": Unknown type 'MissionServer'
SCRIPT    (E): Can't compile "World" script module!

sf_radio/scripts/4_World/useractioncomponent/actions/ќХС*С.wss(71): Unknown type 'MissionServer'
SCRIPT    (E): Failed to load entities script!

 

Edited by QQuasaRR (see edit history)

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Убираем все моды с шифрованными pbo файлами и проверяем снвоа свою ошибку. Она может не толь текст изменить, но и даже имя мода и номер строки файла

Share this post


Link to post
Share on other sites



  • 0

Оставил только свой мод.
Crash log:
 

---------------------------------------------
Log C:\Program Files (x86)\Steam\steamapps\common\DayZServer\profiles\crash_2024-05-24_00-13-24.log started at 24.05. 00:13:25



------------------------------------
Desktop-ZDP83, 24.05 2024 00:13:25
Can't compile "World" script module!

GFTPerks/scripts/4_World/gftperks\entities\manbase\playerbase.c(93): Unknown type 'MissionServer'

Runtime mode
CLI params: port 2302 config serverDZ.cfg cfg basic.cfg profiles profiles user user dologs  adminlog  netlog  freezecheck  mod @GFTPerks BEpath C:\Program Files (x86)\Steam\steamapps\common\DayZServer\battleye 

Script log:
 

---------------------------------------------
Log C:\Program Files (x86)\Steam\steamapps\common\DayZServer\profiles\script_2024-05-24_00-13-24.log started at 24.05. 00:13:24

SCRIPT       : Registered 300 temporary action enum(s), UAN==300
SCRIPT       : ... Backlit Effects Enabled
SCRIPT    (E): @"GFTPerks/scripts/4_World/gftperks\entities\manbase\playerbase.c,93": Unknown type 'MissionServer'
SCRIPT    (E): Can't compile "World" script module!

GFTPerks/scripts/4_World/gftperks\entities\manbase\playerbase.c(93): Unknown type 'MissionServer'
SCRIPT    (E): Failed to load entities script!

 

Share this post


Link to post
Share on other sites
  • 0

в 4_world никаких:

#include "GFTPerks/scripts/5_Mission/GFTPerks/missionserver.c"
#include "GFTPerks/scripts/5_Mission/GFTPerks/missiongameplay.c"

быть не должно. Они сами в 5_Mission сервером считаются при компиляции этого блока кода игры, достаточно чтобы файлы формата .c просто там лежали в этом разделе

Edited by 123new (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.