xMEATx 0 Posted July 25 Here is what the debug is giving me when i run the script. SCRIPT (E): Virtual Machine Exception Reason: NULL pointer to instance. Variable 'm_SpawnLogic' Class: 'SCR_PlayerDeployMenuHandlerComponent' Function: 'OnPostInit' Stack trace: Scripts/Game/Respawn/Menu/SCR_PlayerDeployMenuHandlerComponent.c:62 Function OnPostInit SCRIPT (E): Virtual Machine Exception Reason: NULL pointer to instance. Variable 'm_SpawnLogic' Class: 'SCR_PlayerDeployMenuHandlerComponent' Function: 'OnPostInit' Stack trace: Scripts/Game/Respawn/Menu/SCR_PlayerDeployMenuHandlerComponent.c:62 Function OnPostInit SCRIPT (E): Virtual Machine Exception Reason: NULL pointer to instance. Variable 'm_SpawnLogic' Class: 'SCR_PlayerDeployMenuHandlerComponent' Function: 'OnPostInit' Stack trace: Scripts/Game/Respawn/Menu/SCR_PlayerDeployMenuHandlerComponent.c:62 Function OnPostInit //////////////////////////////////////////////////////////////////////////////////////// Here is the string of code: { super.OnPostInit(owner); SCR_RespawnSystemComponent rsc = SCR_RespawnSystemComponent.GetInstance(); if (!GetGame().InPlayMode() || (rsc && !rsc.CanOpenDeployMenu())) return; World world = GetOwner().GetWorld(); m_DeployMenuSystem = DeployMenuSystem.Cast(world.FindSystem(DeployMenuSystem)); m_DeployMenuSystem.Register(this); m_RespawnComponent = SCR_RespawnComponent.Cast(owner.FindComponent(SCR_RespawnComponent)); if (!m_RespawnComponent) { Print(string.Format("%1 could not find %2!", Type().ToString(), SCR_RespawnComponent), LogLevel.ERROR); } m_PlayerController = SCR_PlayerController.Cast(owner); if (!m_PlayerController) { Print(string.Format("%1 is not attached in %2 hierarchy! (%1 should be a child of %3!)", Type().ToString(), SCR_PlayerController, SCR_RespawnComponent), LogLevel.ERROR); } m_PlyFactionAffil = SCR_PlayerFactionAffiliationComponent.Cast(owner.FindComponent(SCR_PlayerFactionAffiliationComponent)); m_RespawnComponent.GetOnRespawnReadyInvoker_O().Insert(OnRespawnReady); m_RespawnComponent.GetOnRespawnResponseInvoker_O().Insert(SetNotReady); m_SpawnLogic = SCR_MenuSpawnLogic.Cast(rsc.GetSpawnLogic()); SCR_ReconnectSynchronizationComponent reconnectComp = SCR_ReconnectSynchronizationComponent.Cast(owner.FindComponent(SCR_ReconnectSynchronizationComponent)); if (reconnectComp) reconnectComp.GetOnPlayerReconnect().Insert(OnPlayerReconnect); SCR_WelcomeScreenComponent welcomeScreenComp = SCR_WelcomeScreenComponent.Cast(GetGame().GetGameMode().FindComponent(SCR_WelcomeScreenComponent)); if (!welcomeScreenComp) SetWelcomeClosed(); } ANY HELP WOULD BE MUCH APPRECIATED AS I AM NOT THE SMARTEST. Share this post Link to post Share on other sites
[asa]oden 0 Posted July 25 My best guess would be that you miss "SCR_RespawnSystemComponent" in your gamemode. Maybe BI should add "if (!rsc) return; in there. Are you building something or running an existing mission? Share this post Link to post Share on other sites