problem with using return

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

i am working on making a save code using
this tutorial
and each time i attempt to use the

return save_dict

part, it says “Mixed tabs and spaces in indentation.”
please help

:bust_in_silhouette: Reply From: RoniPerson

GDScript uses indentation. So after a function all code is indented by one tab. In the editor godot uses tabs for indentation.
But you have copied code from somewhere where spaces where used instead of tabs. (For example this Q&A)

But in my editor (3.2.3) when using spaces it autoconverts them to tabs on saving. But only with 4 spaces in a row. So mabe there are only 3 in your case or it is a setting which I enabled. The best salution is yust to delete all indentation of copied code an reindent it with tabs.

:bust_in_silhouette: Reply From: spacepoolnoodle

I ran into this problem. My solution is to copy and paste the code into notepad++ and use the replace tool to replace " " (4 spaces) with “\t” (tab).