Problem with item switching!

Hello good people !

Sorry for this post, i am not professional, but i am trying to make some fishing game.
I came to part where i get “Realistic FPS Controller” https://assetstore.unity.com/packages/templates/packs/realistic-fps-controller-free-223479

I put him inside my game succesfully, but switching items on Mouse Scroll is only working on demo. When i try to do it i get error "
NullReferenceException: Object reference not set to an instance of an object
EvolveGames.ItemChange.FixedUpdate () (at Assets/EvolveGames/RealisticFPSController/Scripts/ItemChange.cs:104)"

I was trying to change something but i didn’t do nothing actually. I have problem with line 104, on line 104 staying this

So all other controlls are working, only item switching is not working.

And i have 1 more problem, it shows me crowbar and fishing rod in same time, but i want to switch between

If there is any help ill appriciate ! Thanks guys

Apparently not.

The answer is ALWAYS the same… ALWAYS.

How to fix a NullReferenceException error

https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/

Three steps to success:

  • Identify what is null
  • Identify why it is null
  • Fix that
1 Like

This is what staying in script documentation my friend… “You drag the Payer Controller to the scene and you’re done”… When i start demo its working, when i drag and drop it to my scene scrolling items is not working…

And i know that i need to identify what is null, why is null and because i cant fix it easy like that i send this tread here for help…

Edit: i have found in console first error that is triggering other 104 line… it say this "
NullReferenceException: Object reference not set to an instance of an object
EvolveGames.ItemChange.Start () (at Assets/EvolveGames/RealisticFPSController/Scripts/ItemChange.cs:25)
"
and this is that line "
Color OpacityColor = ItemCanvasLogo.color;
"

Thanks anyway

Unfortunately the computer REQUIRES you to fix that error, and unfortunately YOU are the only person on this green earth who can fix that error.

Go back to the three steps, they won’t change, and they are the ONLY three steps that will solve this problem. That’s not my doing, that’s not ANYBODY bringing you down, that is how computers work.

I’ll post it again for you:

How to fix a NullReferenceException error

https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/

Three steps to success:

  • Identify what is null
  • Identify why it is null
  • Fix that

If any of that is mysterious than go straight to any one of ten billion C# programming tutorials on how to fix the problem. But the above three steps and link help is very specific to Unity, especially the parts about step #2.

Why i am even trying to find help here…thanks for nothing and wish you al the best Kurt ! Admins can close the thread

This is absolutely FASCINATING to me.

I would really someday love to know exactly which parts of the first step you are struggling with.

The first step is Identify what is null. I assume you are stuck on this first step?

What part of the suggestions in the links above has got you stumped? Here’s the text:

Could you please put a giant red mark on the part you are struggling with below because I just cannot imagine what is going wrong here… this is just such unbelievably simple stuff!!!

8411220--1111512--Screen Shot 2022-09-02 at 12.12.11 PM.png

I’m amazed that you come here looking for help and somehow get into it with one of the nicest people on the forum.

You do realize Kurt has zero obligation to help you, right?

He’s extremely good at helping people and does so out of the kindness of his heart and that’s how you treat him?

Wow!

I would seriously consider apologizing and thanking him for the help. Otherwise, maybe game development isn’t for you.

And by the way, the reason you need to fix errors that are down the pipeline is because Unity stops trying to work when it realizes it can’t.

1 Like

Now I wonder, if it says ‘join this discord’ and you have access to customer support, why do you feel anyone else is obliged to fix someone’s assets? We don’t work for Unity (if even Unity had anything to do with 3rd party assets), nor we can possibly know all the assets on the asset store.

Kurt’s answer is the only way to rationally respond to your request. We’re not omniscient let alone idle.

1 Like

make sure the inspector has everything set the same as your demo had.

Good luck on it Gordon. You’ll probably have to learn a lot. But the fact you are going for a Gordon Freeman protagonist you should keep at it it will become less frustrating as you go.