Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | lyji |
extends Node
var inventory = PoolStringArray()
var count = 0
func checkItem(neededItem):
if neededItem in inventory:
print("I already have one though,
so I guess I'll put this back...")
else:
while count < inventory.length():
if inventory[count] == null:
inventory.set(count, neededItem)
break
count += 1
Tried using double indentations on line 9 so that I could make the code easier to read, but it gives me the error: error(9,10): Parse Error: Unexpected EOL at String.
When I use the print statement normally without indentation however, it compiles just fine.
I read in the formatting section here that I should be able to use double indents, but it doesn’t work. Any advice?