• Godot Help
  • Please I hope anybody could let me know how to solve this error, thank you.

Could somebody possibly explain the error output that I'm given as "Invalid get index so and so...". Basically, the following 4 lines that I pointed with red arrow produces the error. Although it wont quite crash the play test, and it doesn't seem to show undesirable results to my game. However, its been bugging me for weeks now as to why these errors are shown to me the first place. Is there any particular solution and change to those lines to fix this?

The errors are reportedly being thrown at GamePouch.gd at line 22, and HealthBar.gd, ArmorBar.gd, and ManaBar.gd each at line 7. What's going on in those scripts?

    Did you search to know if setget keyword is supported the way you use it in the version of Godot you are using for this project ?

    I found this which could be an answer, some beta version of Godot 4 may have broke the feature a bit.

    Always give Godot version (+hardware/OS) in order to be helped, there are so much changes between versions !

      The OP is using Godot 3.5.1. That can be seen at the lower right corner of the screenshot.

      cybereality

      Thanks for sending this, I might actually look this up back again when I finally move to Godot 4 version when stable. Seems like this is applicable for 4.x version of Godot. But Im apparantly using the stable version currently which is 3.5.1..

      JusTiCe8

      Thats helpful to know. I wouldnt have think of it though. But I'll try to learn more about this thanks!

      DaveTheCoder

      Waitttt, no way dude that literally fix it! I simply removed the "tool" and now its not acting like a tool script anymore, the errors are simply gone now haha thanks a lot! But I still wonder why is the tool scripts has that effect though, well does'nt matter anyways...

      That was just a hunch. Tool scripts are tricky.