Page MenuHomeFeedback Tracker

Server Won't Boot - Experimental modding : if(!myItem.IsInvEmpty())
Closed, ResolvedPublic

Description

ActionDismantle scripts broken -- Server won't launch

Can't compile "World" script module!

FP_Extras/scripts/4_world/dismantal\actiondismantlefp_well.c(43): Undefined function 'FP_Well.IsInvEmpty'

Runtime mode
CLI params: config serverDZ.cfg port 2903 servermod mod @CF;@Zomberry Admin Tools;@BuilderItems;@MuchCarKey;@MuchStuffPack;@FairPlayMods;@Code Lock profiles F:\DayZServerExp\profile dologs adminlog netlog freezecheck


override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
{

		//Action not allowed if player has broken legs
		if (player.m_BrokenLegState == eBrokenLegs.BROKEN_LEGS)
			return false;

		Object targetObject = target.GetObject();
		if ( targetObject )
		{
			FP_Well myItem = FP_Well.Cast( targetObject );
			if(myItem)
			{
				if(!myItem.IsInvEmpty()) return false;
					return true;
			}
		}
		if (myItem && !player.IsPlacingLocal())
			return true;
		else
			return false;

}

Returns with Server crash \ not starting up on Experimental Server

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
19045.3516
Category
General
Steps To Reproduce

Server Launch - Won't start Been working for years. ---

Additional Information

class ActionDismantleFP_WellCB : ActionContinuousBaseCB
{
override void CreateActionComponent()
{

		m_ActionData.m_ActionComponent = new CAContinuousRepeat( UATimeSpent.DEFAULT_DESTROY/ActionDestroyPart.Cast(m_ActionData.m_Action).CYCLES );

}
};

class ActionDismantleFP_Well: ActionContinuousBase
{
//GardenPlot m_GardenPlot;
override void CreateConditionComponents()
{

		m_ConditionItem = new CCINonRuined;//new CCINone;
		m_ConditionTarget = new CCTCursor;

}

void ActionDismantleFP_Well()
{

		m_CallbackClass	= ActionDismantleFP_WellCB;
		m_FullBody = true;
		m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
		m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;

}

override string GetText()
{

		return "Pack Well";

}

override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
{

		//Action not allowed if player has broken legs
		if (player.m_BrokenLegState == eBrokenLegs.BROKEN_LEGS)
			return false;

		Object targetObject = target.GetObject();
		if ( targetObject )
		{
			FP_Well myItem = FP_Well.Cast( targetObject );
			if(myItem)
			{
				if(!myItem.IsInvEmpty()) return false;
					return true;
			}
		}

if (targetitem.GetInventory().AttachmentCount() == 0 && targetitem.GetNumberOfItems() == 0)
return true;

		if (myItem && !player.IsPlacingLocal())
			return true;
		else
			return false;

}

void SetupAnimation( ItemBase item )
{

		if ( item )
		{
			m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
		}

}

override void OnFinishProgressServer( ActionData action_data )
{

		FP_Well targettable = FP_Well.Cast(action_data.m_Target.GetObject());
		GetGame().CreateObject("FP_Well_Kit", action_data.m_Player.GetPosition(), false);
		targettable.Delete();

		if (GetGame().IsServer())
			MiscGameplayFunctions.DealAbsoluteDmg(action_data.m_MainItem, 10);

}
};

Event Timeline

Geez changed the task status from New to Reviewed.Oct 6 2023, 9:46 AM
Geez added a subscriber: Geez.

Hello Hydroblast.
Looks like one of the mods is not updated properly for the 1.23 update.

Yup; was hoping to find out what had changed? Its my mod; and has worked for many many updates

Fixed - I was missing

	   bool IsInvEmpty()

{

		if (GetNumberOfItems() < 1 &&  GetInventory().AttachmentCount() < 1)
		{
			return true;
		}
		return false;

}

in my item class ;

Resolved;

Geez closed this task as Resolved.Oct 9 2023, 10:43 AM
Geez claimed this task.