Ultimate Horror FPS Kit error

Hi guys, I just got this kit and I’ve fixed a lot of errors but this one stumps me. It’s claiming that I have an invalid token but I don’t know what to fix on it.

Error: Assets\ThunderWire Studio\UHFPS\Content\Scripts\Runtime\RenderFeatures\EffectFeature.cs(9,27): error CS1519: Invalid token ‘;’ in class, record, struct, or interface member declaration

The script itself:

using UnityEngine.Rendering;
using System;
namespace UHFPS.Rendering
{
[Serializable]
public abstract class EffectFeature
{
public RenderPass;
public bool Enabled = true;
public abstract string Name { get; }
public abstract void OnCreate();
public virtual OnGetRenderPass()
{
if (RenderPass == null)
return null;
RenderPass.ConfigureInput(ScriptableRenderPassInput.Color);
return RenderPass;
}
}
}

Again don’t know what to change or how to fix it. Thanks

Please use code tags.
For store assets, contact the asset developer for support.

The issue is obvious:
public RenderPass;

The type of the field is missing.
Since assets go through review, and there must not be any compile errors, I cannot imagine how this script went live on the store as is. Try creating a new project and import the asset into it. There should not be any compile errors, besides any compatibility errors due to changes in API or C# versions.

Sorry looks like I got the wrong script in there by accident. My bad. Again here is the error

Assets\ThunderWire Studio\UHFPS\Content\Scripts\Runtime\Interact\Other\CustomInteractEvent.cs(67,28): error CS0246: The type or namespace name ‘JToken’ could not be found (are you missing a using directive or an assembly reference?)

And the real script that goes with it

using UnityEngine.Events;
using UnityEngine;
using UHFPS.Tools;
using Newtonsoft.Json.Linq;
namespace UHFPS.Runtime
{
public class CustomInteractEvent : MonoBehaviour, IInteractStart, IInteractHold, IInteractStop, ISaveable
{
public bool UseOnStartEvent;
public bool UseOnHoldEvent;
public bool UseOnStopEvent;
public bool FreezePlayer;
public bool InteractOnce;
public bool UseInteractSound;
public SoundClip InteractSound;
public UnityEvent OnStart;
public UnityEvent OnHold;
public UnityEvent OnStop;
private PlayerPresenceManager playerPresence;
private bool isInteracted;
private void Awake()
{
playerPresence = PlayerPresenceManager.Instance;
}
public void InteractStart()
{
if (isInteracted)
return;
if (UseOnStartEvent) OnStart?.Invoke();
if (FreezePlayer) playerPresence.FreezePlayer(true);
if (UseInteractSound) GameTools.PlayOneShot2D(transform.position, InteractSound, “InteractSound”);
}
public void InteractHold(Vector3 point)
{
if (isInteracted)
return;
if (UseOnHoldEvent) OnHold?.Invoke(point);
}
public void InteractStop()
{
if (isInteracted)
return;
if (UseOnStopEvent) OnStop?.Invoke();
if (FreezePlayer) playerPresence.FreezePlayer(false);
if (InteractOnce) isInteracted = true;
}
public StorableCollection OnSave()
{
return new StorableCollection()
{
{ “interactOnce”, isInteracted }
};
}
public void OnLoad(JToken data)
{
isInteracted = (bool)data[“interactOnce”];
}
}
}

I already messaged the creator of horror fps kit as they don’t seem to message back. That’s why I asked on here as I’m trying to hit my deadline for my game and I can’t wait. Anyway thanks again.

And forgot to add code tags again. Sorry

Ok now another error has occurred stating an Identifier expected error. I can’t seem to find out where it is other than the lines 143 and 41 but this doesnt make sense. Again I can’t figure this out. Something in this code is wrong. I tried to message the dev of this kit but as I said, I’m hitting a deadline and I just need answers. If anyone can figure this out, let me know. Has anyone used Ultimate Horror FPS Kit yet? I tried importing to my blank project and even switching projects and it still gives me these errors. Anyway, thanks again.

The error

Assets\ThunderWire Studio\UHFPS\Content\Scripts\Runtime\Core\Inventory\Behaviour\ItemsStorage.cs(143,41): error CS1001: Identifier expected

using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UHFPS.Tools;
using Newtonsoft.Json.Linq;
namespace UHFPS.Runtime
{
    public class ItemsStorage : InventoryContainer, IInteractTimed, IInteractStart, IInteractStop
    {
        [Serializable]
        public struct StorageItem
        {
            public ItemGuid Item;
            public uint Quantity;
            public Vector2Int Coords;
            public ItemCustomData ItemData;
        }
        public List<StorageItem> StoredItems = new();
        [Tooltip("Interact with the container after holding the use button for a certain amount of time.")]
        public bool TimedOpen;
        [Tooltip("Instantly interact with the container after searching the container once.")]
        public bool KeepSearched;
        [Tooltip("Automatically arrange the stored items in the container.")]
        public bool AutoCoords;
        [field: SerializeField]
        public float InteractTime { get; set; }
        public AudioSource AudioSource;
        public SoundClip SearchingSound;
        public SoundClip OpenStorageSound;
        public SoundClip CloseStorageSound;
        public UnityEvent OnStartSearch;
        public UnityEvent OnOpenStorage;
        public UnityEvent OnCloseStorage;
        public bool NoInteract => isSearched || !TimedOpen;
        private bool isSearched;
        private void Start()
        {
            ContainerTitle.SubscribeGloc();
            if (!SaveGameManager.GameWillLoad)
            {
                foreach (var storedItem in StoredItems)
                {
                    string containerGuid = GameTools.GetGuid();
                    Item item = storedItem.Item.GetItem();
                    ushort width = item.Width;
                    ushort height = item.Height;
                    if (!AutoCoords)
                    {
                        ContainerItems.Add(containerGuid, new()
                        {
                            ItemGuid = storedItem.Item.GUID,
                            Item = item,
                            Quantity = (int)storedItem.Quantity,
                            Orientation = Orientation.Horizontal,
                            CustomData = storedItem.ItemData,
                            Coords = storedItem.Coords
                        });
                    }
                    else if(CheckSpace(width, height, out var freeSpace))
                    {
                        ContainerItems.Add(containerGuid, new()
                        {
                            ItemGuid = storedItem.Item.GUID,
                            Item = item,
                            Quantity = (int)storedItem.Quantity,
                            Orientation = freeSpace.orientation,
                            CustomData = storedItem.ItemData,
                            Coords = new(freeSpace.x, freeSpace.y)
                        });
                    }
                    else
                    {
                        Debug.LogError($"There is no space in the container for the item '{item.Title}'!");
                    }
                }
            }
        }
        public void InteractTimed()
        {
            if (!TimedOpen)
                return;
            OpenInventoryContainer();
            isSearched = KeepSearched;
        }
        public void InteractStart()
        {
            if (!isSearched && TimedOpen)
            {
                AudioSource.SetSoundClip(SearchingSound, play: true);
                OnStartSearch?.Invoke();
                return;
            }
            OpenInventoryContainer();
        }
        public void InteractStop()
        {
            if (TimedOpen && AudioSource != null)
                AudioSource.Stop();
        }
        private void OpenInventoryContainer()
        {
            if (TimedOpen && AudioSource != null)
                AudioSource.Stop();
            inventory.OpenContainer(this);
            AudioSource.PlayOneShotSoundClip(OpenStorageSound);
            OnOpenStorage?.Invoke();
        }
        public override void OnStorageClose()
        {
            AudioSource.PlayOneShotSoundClip(CloseStorageSound);
            OnCloseStorage?.Invoke();
        }
        public override StorableCollection OnSave()
        {
            StorableCollection saveableBuffer = new()
            {
                { "items", base.OnSave() },
                { nameof(isSearched), isSearched }
            };
            return saveableBuffer;
        }
        public override void OnLoad(data)
        {
            base.OnLoad(data["items"]);
            isSearched = (bool)data[nameof(isSearched)];
        }
    }
}

What editor version are you on? The kit is compatible with Unity 2022.

If you happen to use an earlier Unity version that might explain issues due to older C# versions, for example this line is making use of the C# 9 feature where you can simply use “new()” instead of “new StorableCollection()”:

StorableCollection saveableBuffer = new()
{
   ...
};