godot: GDScript: writing only "array[i]" doesn't trigger an error

Tested on my Godot fork (last update 4d8bed33215c005f6aa6fcb34d5d343ee3bee23e) Windows 10 64 bits

I wrote this in GDScript:

	for i in range(0, index):
		pts[j]
		j += 1

I forgot to assign a value to pts[j] or do anything with it. However, it didn’t trigger any error, the code probably did nothing at all. It took me some time to find this, it would be nice for Godot to indicate this as an error.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 4
  • Comments: 16 (15 by maintainers)

Most upvoted comments

GDScript would benefit in a system for warnings where this kind of things could be reported.