Skip to content
This repository was archived by the owner on Apr 7, 2023. It is now read-only.
This repository was archived by the owner on Apr 7, 2023. It is now read-only.

Bug with giving items #3

@redstonedesigner

Description

@redstonedesigner

So, I configurated my customloadouts system.

I get the following error:

[ERROR] [karlofduty.CustomLoadouts] System.NullReferenceException: Object reference not set to an instance of an object
at CustomLoadouts.CustomLoadouts.TryGiveItems (Newtonsoft.Json.Linq.JToken currentNode, System.Collections.Generic.IEnumerable`1[T] nodesToCheck, Smod2.API.Player player) [0x00684] in <87056bae736a43219f1e6baf7ad52f12>:0
at CustomLoadouts.ItemGivingHandler+<>c__DisplayClass2_0+<<OnSpawn>b__0>d.MoveNext () [0x00222] in <87056bae736a43219f1e6baf7ad52f12>:0
[ERROR] [karlofduty.CustomLoadouts] System.NullReferenceException: Object reference not set to an instance of an object
at CustomLoadouts.CustomLoadouts.TryGiveItems (Newtonsoft.Json.Linq.JToken currentNode, System.Collections.Generic.IEnumerable`1[T] nodesToCheck, Smod2.API.Player player) [0x00684] in <87056bae736a43219f1e6baf7ad52f12>:0
at CustomLoadouts.ItemGivingHandler+<>c__DisplayClass2_0+<<OnSpawn>b__0>d.MoveNext () [0x00222] in <87056bae736a43219f1e6baf7ad52f12>:0
[ERROR] [karlofduty.CustomLoadouts] System.NullReferenceException: Object reference not set to an instance of an object
at CustomLoadouts.CustomLoadouts.TryGiveItems (Newtonsoft.Json.Linq.JToken currentNode, System.Collections.Generic.IEnumerable`1[T] nodesToCheck, Smod2.API.Player player) [0x00684] in <87056bae736a43219f1e6baf7ad52f12>:0
at CustomLoadouts.ItemGivingHandler+<>c__DisplayClass2_0+<<OnSpawn>b__0>d.MoveNext () [0x00222] in <87056bae736a43219f1e6baf7ad52f12>:0
[ERROR] [karlofduty.CustomLoadouts] System.NullReferenceException: Object reference not set to an instance of an object
at CustomLoadouts.CustomLoadouts.TryGiveItems (Newtonsoft.Json.Linq.JToken currentNode, System.Collections.Generic.IEnumerable`1[T] nodesToCheck, Smod2.API.Player player) [0x00684] in <87056bae736a43219f1e6baf7ad52f12>:0
at CustomLoadouts.ItemGivingHandler+<>c__DisplayClass2_0+<<OnSpawn>b__0>d.MoveNext () [0x00222] in <87056bae736a43219f1e6baf7ad52f12>:0
[ERROR] [karlofduty.CustomLoadouts] System.NullReferenceException: Object reference not set to an instance of an object
at CustomLoadouts.CustomLoadouts.TryGiveItems (Newtonsoft.Json.Linq.JToken currentNode, System.Collections.Generic.IEnumerable`1[T] nodesToCheck, Smod2.API.Player player) [0x00684] in <87056bae736a43219f1e6baf7ad52f12>:0
at CustomLoadouts.ItemGivingHandler+<>c__DisplayClass2_0+<<OnSpawn>b__0>d.MoveNext () [0x00222] in <87056bae736a43219f1e6baf7ad52f12>:0
[ERROR] [karlofduty.CustomLoadouts] System.NullReferenceException: Object reference not set to an instance of an object
at CustomLoadouts.CustomLoadouts.TryGiveItems (Newtonsoft.Json.Linq.JToken currentNode, System.Collections.Generic.IEnumerable`1[T] nodesToCheck, Smod2.API.Player player) [0x00684] in <87056bae736a43219f1e6baf7ad52f12>:0
at CustomLoadouts.ItemGivingHandler+<>c__DisplayClass2_0+<<OnSpawn>b__0>d.MoveNext () [0x00222] in <87056bae736a43219f1e6baf7ad52f12>:0

My config is:

# Prints a confirmation whenever a player is given a loadout
verbose: true
# Prints debug messages
debug: false
# Adds a ms delay if needed for plugin compatibility
delay: 0

# Filters are processed in the order they are written except anything marked as "all" is always processed before all other entries
items:
    # SteamID
    all:
        # Rank, the name of the server rank defined in config_remoteadmin.txt. Set to none for only players without a rank.
        all:
            # Class, check #resources in the SMOD discord server for class names
            SCIENTIST:
                - 10:
                    - REMOVEITEMS
                    - MAJOR_SCIENTIST_KEYCARD
                    - MEDKIT
                - 5:
                    - REMOVEITEMS
                    - REMOVEAMMO
                    - USP
                    - DROPPED_9
                    - DROPPED_9
                    - MAJOR_SCIENTIST_KEYCARD
                    - MEDKIT
            CHAOS_INSURGENCY:
                - 100:
                    - DISARMER
            CLASSD:
                - 25:
                    - MEDKIT
                - 10:
                    - JANITOR_KEYCARD
            NTF_COMMANDER:
                - 0.1:
                    - O5_LEVEL_KEYCARD
                - 100:
                    - DROPPED_5
                    - DROPPED_5
                    - DROPPED_5
                    - DROPPED_5
                    - DROPPED_5
                    - DROPPED_5
                    - DROPPED_5
                    - DROPPED_5
            FACILITY_GUARD:
                - 100:
                    - DROPPED_7
                    - DROPPED_7
                    - DROPPED_7
                    - DROPPED_7
                - 25:
                    - REMOVEITEMS
                    - SENIOR_GUARD_KEYCARD
                    - P90
                    - DROPPED_9
                    - DROPPED_9
                    - DROPPED_9
                    - DROPPED_9
           NTF_CADET:
                - 100:
                    - DROPPED_9
                    - DROPPED_9
                    - DROPPED_9
                    - DROPPED_9
           NTF_LIEUTENANT:
                - 100:
                    - DROPPED_5
                    - DROPPED_5
                    - DROPPED_5
                    - DROPPED_5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions