Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CoP from GoG: Missing gamedata\scripts\actor_menu_inventory.script #1732

Closed
plaes opened this issue Nov 12, 2024 · 3 comments
Closed

CoP from GoG: Missing gamedata\scripts\actor_menu_inventory.script #1732

plaes opened this issue Nov 12, 2024 · 3 comments

Comments

@plaes
Copy link
Contributor

plaes commented Nov 12, 2024

Describe the bug

Seems like CoP extracted from GoG installer (v2.1.0.17) is missing a script: gamedata\scripts\actor_menu_inventory.script:

! [LUA]  Cannot open file "...\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\scripts\actor_menu_inventory.script"
stack traceback:

Script is referenced from source code (added in pull #1030):

if (GEnv.ScriptEngine->functor("actor_menu_inventory.CUIActorMenu_OnItemDropped", funct1))

Desktop (please complete the following information):

  • OS: Fedora 41
  • OpenXRay dev branch HEAD (commit ec2263a)
@plaes plaes added the Bug The issue in the run-time. label Nov 12, 2024
@Xottab-DUTY Xottab-DUTY added Player Experience Not a bug and removed Bug The issue in the run-time. labels Nov 12, 2024
@Xottab-DUTY
Copy link
Member

Xottab-DUTY commented Nov 12, 2024

This is not original game file, it's optional and can be added by modmakers to enhance gameplay functionality.

But the fact that it can confuse people due to a log message is a problem, though.

@Xottab-DUTY Xottab-DUTY moved this to To do in Roadmap Nov 12, 2024
@alsed
Copy link

alsed commented Jan 2, 2025

Asuming that all optional files are located in "/gamedata/" , a search for it in cfg_full_name could print a specific message.
This will inform any problem with an optional script.

https://github.com/OpenXRay/xray-16/blob/dev/src/xrEngine/xr_ioc_cmd.cpp#L221

    string1024 str;
    if (F != nullptr)
    {
        while (!F->eof())
        {
            F->r_string(str, sizeof(str));
            if (allow(str))
                Console->Execute(str);
        }
        FS.r_close(F);
        Msg("[%s] successfully loaded.", cfg_full_name);
    }
    else if (cfg_full_name.find("/gamedata/") != std::string::npos)
    {
        Msg("! Cannot open optional script file [%s]", cfg_full_name);
    }
    else
    {
        Msg("! Cannot open script file [%s]", cfg_full_name);
    }

@Xottab-DUTY
Copy link
Member

Oops, sorry!
This was fixed in 947749c.

@github-project-automation github-project-automation bot moved this from To do to Done in Roadmap Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants