This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

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

Godot version 3.2
in Engine by (22 points)

2 Answers

0 votes

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.

by (335 points)
0 votes

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).

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.