invalid get index (yeah, I know) from tools during editing

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Kalmier

I have an autoload script, PlayerData, with a _Debug_Mode variable (int). Debug messages are displayed based on the value of _Debug_Mode (0 = none, 1 = event triggers, 2 = var reassignment, etc).

I also have tools made, like items where you can set there “item_type” and the item in the editor will reflect it.

but since it’s a tool in the editor, and it’s not running the autoload script, PlayerData, I keep getting these untrue warning in my output while editing, scrolling past possible useful information.

(warnings do not appear while running, this is while editing)

any advice??

:bust_in_silhouette: Reply From: Kalmier

moved the code for debug messages.

Separated it from the code that updates the items when I change the “item_type” variable in my editor.