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

Bug with giving items #3

Open
redstonedesigner opened this issue Feb 19, 2019 · 6 comments
Open

Bug with giving items #3

redstonedesigner opened this issue Feb 19, 2019 · 6 comments

Comments

@redstonedesigner
Copy link

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
@KarlOfDuty
Copy link
Owner

Decimals aren't currently supported.

@KarlOfDuty
Copy link
Owner

Test if this one works, if it does I'll make it a real release.

cl.zip

@redstonedesigner
Copy link
Author

Does not work. Same / similar error.

@KarlOfDuty
Copy link
Owner

ok, try putting it within quotes

@redstonedesigner
Copy link
Author

The item names?

@KarlOfDuty
Copy link
Owner

no, the chance

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants