Problems creating custom Pie Menus

Hello y’all!

I am learning to create my own “Pie Menus” and I have a problem: The pie menu I created does not work after I close and reopen Blender.
Even after saving the Pie Menu script file, ticking the “Register” tick box in the text editor AND saving the configuration file (User Settings), the Pie Menu functionality does not persist after closing the program. Using the hotkey stops working after reopening Blender.

It only works if I manually load the script in the text editor, press “Run Script” and then use the hotkey it in the viewport.

Also, when I load the script (which is saved in a documents folder) and try to run it by pressing “Run Script” it doesn’t show the pie menu in the text editor. It only enables it when I press the hotkey in the viewport.

The only pie menu that work in the text editor by pressing “Run Script” is the “Ui Pie Menu” template that comes with blender.
Scripts saved in my work folders don’t run when pressing “Run Script”.

Does anyone know what I’m doing wrong?
Thank you!

I figure it out… I research more and went through the official pie menus add-on and started copying and pasting things until it eventually worked.
I found out about the register and unregister methods and a bunch of other stuff.

so what was the cause of the problem… please share