Page MenuHomeFeedback Tracker

Compilation error when modding SCR_CampaignBase
Need More Info, NormalPublic

Description

Modding 'scripts/Game/Entities/Campaign/SCR_CampaignBase.c' throws an error to an unrelated class 'SCR_CampaignTaskManager' when compiling:

modded class SCR_CampaignBase
{	
};
Can't find matching overload for function 'GetTask'
scripts/Game/Entities/Campaign/SCR_CampaignBase.c
line 2612
2608: SCR_CampaignTaskManager tManager = SCR_CampaignTaskManager.GetCampaignTaskManagerInstance();
...
2612: SCR_CampaignTask task = tManager.GetTask(this, faction, SCR_CampaignTaskType.CAPTURE);

Error persists after changing the modded file's name and directory, and modding SCR_CampaignTaskManager to manually override the GetTask method.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General

Event Timeline

naizarak created this task.May 30 2022, 1:05 AM
reyhard added a subscriber: reyhard.EditedMay 30 2022, 8:34 AM

When using modded keyword, you still have to keep original inheritance

modded class class SCR_CampaignBase : SCR_BaseCampaignInstallation

would be correct syntax in this case. Since you broke the inheritance, GetTask function (which is present in parent class) is now missing from SCR_CampaignBase

reyhard changed the task status from New to Need More Info.May 30 2022, 8:34 AM

same error, also GetTask isn't in SCR_BaseCampaignInstallation it's in SCR_CampaignTaskManager